Sfoglia il codice sorgente

售后流程修改

liujiankang 6 anni fa
parent
commit
62d3105b4f
19 ha cambiato i file con 1404 aggiunte e 28 eliminazioni
  1. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductColor.java
  2. 1 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductType.java
  3. 6 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/companyInfoMapper.xml
  4. 3 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  5. 1 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/storeInfoMapper.xml
  6. 7 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/productMapper.xml
  7. 11 3
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderController.java
  8. 2 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesChannelController.java
  9. 76 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  10. 13 7
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java
  11. 2 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/InventoryController.java
  12. 3 2
      watero-rst-web/src/main/webapp/WEB-INF/views/order/excel_to_order_new.ftl
  13. 332 0
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_sdorder.ftl
  14. 0 1
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/deliver_statistics.ftl
  15. 4 2
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/product_list.ftl
  16. 922 0
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_sdorder_list.ftl
  17. 3 2
      watero-rst-web/src/main/webapp/WEB-INF/views/order/statistics/deliver_statistics.ftl
  18. 2 1
      watero-rst-web/src/main/webapp/common/js/common/salesChannel.js
  19. 6 0
      watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductColor.java

@@ -51,6 +51,8 @@ public class ProductColor implements Serializable {
 
     private String productNumber;        //产品型号
 
+    private Integer typeCompany;        //所属公司
+
     public String getProductName() {
         return productName;
     }
@@ -195,6 +197,14 @@ public class ProductColor implements Serializable {
         this.productNumber = productNumber;
     }
 
+    public Integer getTypeCompany() {
+        return typeCompany;
+    }
+
+    public void setTypeCompany(Integer typeCompany) {
+        this.typeCompany = typeCompany;
+    }
+
     @Override
     public String toString() {
         return "ProductColor{" +

+ 1 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductType.java

@@ -27,7 +27,7 @@ public class ProductType implements Serializable {
 
     private Integer typeStatus;     //状态
 
-    private Integer typeCompany;    // 所属商城   1:美国watero; 2:上朵电动牙刷  3:优尼雅净水机
+    private Integer typeCompany;    // 所属商城
 
     public Integer getTypeId() {
         return typeId;

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

@@ -27,8 +27,12 @@
     select
     <include refid="companyInfo" />
     from tb_rst_sales_company
-    where
-      company_status = 1
+    <where>
+    <if test="companyId != null and companyId != ''">
+      AND company_id = #{companyId}
+    </if >
+      AND company_status = 1
+    </where>
   </select>
 
 

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

@@ -1355,6 +1355,9 @@
             <if test="endDate != null and endDate != ''">
                 AND sales_create_time <![CDATA[<=]]> #{endDate}
             </if>
+            <if test="salesCompanyId != null and salesCompanyId != ''">
+                AND sales_company_id = #{salesCompanyId}
+            </if>
         </where>
         GROUP BY item_color_bar
     </select>

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

@@ -43,7 +43,7 @@
       <if test="storeStatus != null">
         and store_status = #{storeStatus}
       </if>
-      <if test="companyId != null">
+      <if test="companyId != null and companyId != ''">
         and company_id = #{companyId}
       </if>
       <if test="storeName != null">

+ 7 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/productMapper.xml

@@ -64,6 +64,9 @@
             <if test="productType != null and productType != ''">
                 AND p.product_type  = #{productType}
             </if >
+            <if test="typeCompany != null and typeCompany != ''">
+                AND pt.type_company  = #{typeCompany}
+            </if >
         </where>
     </select>
 
@@ -101,7 +104,7 @@
     <select id="listProductType" parameterType="ProductType" resultType="ProductType">
       select
         *
-      from
+        from
         tb_rst_product_type
       <where>
           <if test="typeStatus != null and typeStatus != ''">
@@ -110,6 +113,9 @@
           <if test="typeId != null and typeId != ''">
               type_id = #{typeId}
           </if>
+          <if test="typeCompany != null and typeCompany != ''">
+              type_company = #{typeCompany}
+          </if>
       </where>
     </select>
 

+ 11 - 3
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderController.java

@@ -606,10 +606,13 @@ public class AdminOrderController {
     }
 
     @RequestMapping("/upload_excel")
-    public ModelAndView uploadExcel(@RequestParam("file") String file, HttpServletRequest request) throws IOException {
+    public ModelAndView uploadExcel(@RequestParam("file") String file, HttpServletRequest request,StoreInfo storeInfo) throws IOException {
         ModelAndView mv = new ModelAndView("order/excel_to_order_new");
         // 到设置页面
-        List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
+        List<StoreInfo> listStoreInfo = storeInfoService.listStore(storeInfo);
+        if(storeInfo.getCompanyId() != null ){
+            mv.addObject("companyId",storeInfo.getCompanyId());
+        }
         mv.addObject("listStoreInfo",listStoreInfo);
         mv.addObject("heads", ExcelUtil.readExcelHead(request.getServletContext().getRealPath(file)));
         mv.addObject("logisticsInfoList",logisticsInfoService.getLogisticsInfoList(new LogisticsInfo()));
@@ -929,10 +932,15 @@ public class AdminOrderController {
     @RequestMapping("/get_producttype_store")
     public ResponseJson getProducttypeStore(@RequestParam("orderStoreInfo") String orderStoreInfo,
                                         @RequestParam("productUrl") String filePath,
+                                        @RequestParam("companyId") Integer companyId,
                                         HttpServletRequest request) throws IOException {
         ResponseJson json = new ResponseJson(200, "SUCCESS", 200);
         json.addResponseKeyValue("values", ExcelUtil.readCell(request.getServletContext().getRealPath(filePath), orderStoreInfo));
-        json.addResponseKeyValue("stores", storeInfoService.listStore(new StoreInfo()));
+        StoreInfo storeInfo = new StoreInfo();
+        if(companyId != null && !companyId.equals("")){
+            storeInfo.setCompanyId(companyId);
+        }
+        json.addResponseKeyValue("stores", storeInfoService.listStore(storeInfo));
         return json;
     }
 

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

@@ -54,9 +54,9 @@ public class AdminSalesChannelController {
      */
     @ResponseBody
     @RequestMapping(value = "/select_company")
-    public ResponseJson getCompany(HttpServletRequest request) throws Exception {
+    public ResponseJson getCompany(HttpServletRequest request,CompanyInfo companyInfo) throws Exception {
         //获取销售公司
-        List<CompanyInfo> companyInfoList = companyInfoService.listCompanyInfo(new CompanyInfo());
+        List<CompanyInfo> companyInfoList = companyInfoService.listCompanyInfo(companyInfo);
         ResponseJson rj = new ResponseJson(200, "查询成功", 200);
         rj.addResponseKeyValue("companyInfoList", companyInfoList);
         return rj;

+ 76 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -101,10 +101,16 @@ public class AdminSalesOrderController {
         if (totalNum != 0) {
             pagedResult.setTotal(totalNum);
         }
-        List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
+        StoreInfo storeInfo = new StoreInfo();
+        ProductColor productColor = new ProductColor();
+        if(salesOrder.getSalesCompanyId() != null){
+            storeInfo.setCompanyId(salesOrder.getSalesCompanyId());
+            productColor.setTypeCompany(salesOrder.getSalesCompanyId());
+        }
+        List<StoreInfo> listStoreInfo = storeInfoService.listStore(storeInfo);
         List<LogisticsInfo> logisticsInfoList = logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
         salesOrder.setSalesOrderItemList(null);
-        List<ProductColor> productColorList = productService.listproductAndColor(new ProductColor());
+        List<ProductColor> productColorList = productService.listproductAndColor(productColor);
         StitchAttrUtil.getSa()
                 .addDatePro("yyyy-MM-dd HH:mm:ss","startDate","endDate")
                 .setModelAndView(salesOrder, mv, "/admin/salesOrder/list_order_page", pagedResult);
@@ -117,6 +123,56 @@ public class AdminSalesOrderController {
     }
 
     /**
+     * 上朵分页查询订单列表信息
+     * @param request
+     * @param salesOrder
+     * @param pageSize
+     * @param pageNO
+     * @param totalNum
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping("/list_sdorder_page")
+    @RequiresPermissions("salesOrder:select:salesOrder")
+    public ModelAndView listsdOrderPage(HttpServletRequest request, SalesOrder salesOrder,
+                                      @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
+                                      @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
+                                      @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) throws Exception {
+        ModelAndView mv = new ModelAndView("order/salesOrder/sales_sdorder_list");
+
+        Admin admin = AdminUtils.getLoginAdmin();
+        Integer identity = admin.getAdminDept();
+        if(identity == 2){
+            salesOrder.setSalesAdminId(admin.getAdminId());
+        }
+        salesOrder.setIsSelectCustomer(2);//不查询客诉添加的订单
+        //分页获取订单信息
+        PagedResult<SalesOrder> pagedResult = salesOrderService.listSalesOrderPage(pageNO, pageSize, salesOrder,totalNum == 0);
+        if (totalNum != 0) {
+            pagedResult.setTotal(totalNum);
+        }
+        StoreInfo storeInfo = new StoreInfo();
+        ProductColor productColor = new ProductColor();
+        if(salesOrder.getSalesCompanyId() != null){
+            storeInfo.setCompanyId(salesOrder.getSalesCompanyId());
+            productColor.setTypeCompany(salesOrder.getSalesCompanyId());
+        }
+        List<StoreInfo> listStoreInfo = storeInfoService.listStore(storeInfo);
+        List<LogisticsInfo> logisticsInfoList = logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
+        salesOrder.setSalesOrderItemList(null);
+        List<ProductColor> productColorList = productService.listproductAndColor(productColor);
+        StitchAttrUtil.getSa()
+                .addDatePro("yyyy-MM-dd HH:mm:ss","startDate","endDate")
+                .setModelAndView(salesOrder, mv, "/admin/salesOrder/list_sdorder_page", pagedResult);
+
+        mv.addObject("listStoreInfo",listStoreInfo);
+        mv.addObject("logisticsInfoList",logisticsInfoList);
+        mv.addObject("identity",identity);
+        mv.addObject("productColorList",productColorList);
+        return mv;
+    }
+
+    /**
      * 查询订单详情
      * @param request
      * @return
@@ -632,6 +688,20 @@ public class AdminSalesOrderController {
         return mv;
     }
 
+    @RequestMapping("/to_add_sdorder")
+    @RequiresPermissions("salesOrder:add:manual")
+    public ModelAndView toAddsdOrder(HttpServletRequest request,SalesOrder salesOrder) throws Exception {
+        ModelAndView mv = new ModelAndView("order/salesOrder/add_sdorder");
+        StoreInfo storeInfo = new StoreInfo();
+        storeInfo.setCompanyId(4);
+        List<StoreInfo> storeInfoList = storeInfoService.listStore(storeInfo);
+        mv.addObject("storeInfoList", storeInfoList);
+        mv.addObject("admin", AdminUtils.getLoginAdmin());
+        mv.addObject("orderBatchs", orderBatchService.getOrderBatchListTwenty());
+        mv.addObject("salesOrder", salesOrder);
+        return mv;
+    }
+
     /**
      *  弹出添加商品页面
      * @param request
@@ -646,8 +716,12 @@ public class AdminSalesOrderController {
 
         ProductType productType = new ProductType();
         productType.setTypeId(productColor.getProductType());
+        productType.setTypeCompany(productColor.getTypeCompany());
         List<ProductType> productTypeList = productService.listProductType(productType);
 
+        if(productColor.getTypeCompany() != null){
+            mv.addObject("typeCompany",productColor.getTypeCompany());
+        }
         if(isRadio == null){
             isRadio = 0;
         }

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

@@ -528,14 +528,15 @@ public class AwaitSendController {
      */
     @RequiresPermissions("salesOrder:statistics:deliver")
     @RequestMapping(value = "/deliver_statistics")
-    public ModelAndView deliverStatistics(HttpServletRequest request) {
+    public ModelAndView deliverStatistics(HttpServletRequest request,Integer salesCompanyId) {
         ModelAndView mv = new ModelAndView("order/statistics/deliver_statistics");
+        mv.addObject("salesCompanyId",salesCompanyId);
         return mv;
     }
 
     /**
      * 出库
-     * @param request
+     * @param request/
      * @return
      */
     @ResponseBody
@@ -631,12 +632,12 @@ public class AwaitSendController {
     @ResponseBody
     @RequiresPermissions("salesOrder:deliver:deliverList")
     @RequestMapping("/getDeliverNum")
-    public ResponseJson getDeliverNum(HttpServletRequest request,Integer type) {
+    public ResponseJson getDeliverNum(HttpServletRequest request,Integer type,Integer salesCompanyId) {
         ResponseJson rj = ResponseJson.getSUCCESS();
 
         List<HashMap> allList = new ArrayList<>();
 
-        List<Map<String,Object>> toDayList = this.getNotSendNumADay(new Date());
+        List<Map<String,Object>> toDayList = this.getNotSendNumADay(new Date(),salesCompanyId);
         HashMap map = new HashMap();
         map.put("date",new Date());
         map.put("list",toDayList);
@@ -644,7 +645,7 @@ public class AwaitSendController {
 
         Calendar yesterDay = Calendar.getInstance();
         yesterDay.add(Calendar.DATE, -1);// 日期减1
-        List<Map<String,Object>> yesterDayList = this.getNotSendNumADay(yesterDay.getTime());
+        List<Map<String,Object>> yesterDayList = this.getNotSendNumADay(yesterDay.getTime(),salesCompanyId);
         HashMap yerterMap = new HashMap();
         yerterMap.put("date",yesterDay.getTime());
         yerterMap.put("list",yesterDayList);
@@ -655,7 +656,7 @@ public class AwaitSendController {
         Collections.reverse(dateList);
         for (Date date: dateList) {
             HashMap mapx = new HashMap();
-            List<Map<String,Object>> list = this.getNotSendNumADay(date);
+            List<Map<String,Object>> list = this.getNotSendNumADay(date,salesCompanyId);
             mapx.put("date",date);
             mapx.put("list",list);
             allList.add(mapx);
@@ -671,7 +672,7 @@ public class AwaitSendController {
      * @param date
      * @return
      */
-    private List<Map<String,Object>>  getNotSendNumADay(Date date){
+    private List<Map<String,Object>>  getNotSendNumADay(Date date,Integer salesCompanyId){
         List<Map<String,Object>> list = new ArrayList<>();
 
         //总数
@@ -684,6 +685,11 @@ public class AwaitSendController {
         sendSalesOrder.setSalesShippingStatus(1);
         sendSalesOrder.setSalesDeliver(2);
 
+        if(salesCompanyId != null && !"".equals(salesCompanyId)){
+            allSalesOrder.setSalesCompanyId(salesCompanyId);
+            waitSalesOrder.setSalesCompanyId(salesCompanyId);
+            sendSalesOrder.setSalesCompanyId(salesCompanyId);
+        }
         Calendar calendarStart = Calendar.getInstance();
         calendarStart.setTime(date);
         calendarStart.set(Calendar.HOUR_OF_DAY,0);

+ 2 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/InventoryController.java

@@ -245,8 +245,9 @@ public class InventoryController {
      */
     @ResponseBody
     @RequestMapping(value = "/addInventory")
-    public String toUpdateInventory(HttpServletRequest request) {
+    public String toUpdateInventory(HttpServletRequest request,Integer colorId) {
         ProductColor color = new ProductColor();
+        color.setColorId(colorId);
         List<ProductColor> listColor  = productColorService.getProductColorList(color);
         for(ProductColor productColor : listColor){
             Product product = productService.getProductById(productColor.getColorId());

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

@@ -184,7 +184,7 @@
                             </div>
                         </div>
                     </div>
-
+                    <input type="hidden" value="${companyId!''}" id="companyId" name="companyId">
                     <div id="store-select-1"  style="width: 100%;float: left;">
                         <label>
                             <select class="my-select" name="shop-id" id="shop-id" style="height: 30px;width: 180px;margin: 0px;">
@@ -447,7 +447,8 @@
         var index = layer.load(1, {
             shade: [0.5,'#fff'] //0.1透明度的白色背景
         });
-        $.post(root_path + "/admin/order/get_producttype_store",{"orderStoreInfo":orderStoreInfo, "productUrl":$("#productUrl").val()},function(result){
+        var companyId = $("#companyId").val();
+        $.post(root_path + "/admin/order/get_producttype_store",{"orderStoreInfo":orderStoreInfo, "productUrl":$("#productUrl").val(), "companyId":companyId},function(result){
             if (result.returnCode != 200) {
                 layer.msg('加载失败,请重试!',{icon: 5,time:3000});
             } else {

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

@@ -0,0 +1,332 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <#include "/base/add_base.ftl">
+
+    <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;}
+        .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;color: #50a2ea;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 45%;height: 6px;width: 6px;border-radius: 6px;background-color: #32a3d8;}
+        #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
+        .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
+        .ac_results li {border:1px solid #fff}
+        .ac_results li a span {float:right}
+        .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
+        .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 15px;}
+        .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
+        .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
+        .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent  #32a3d8 transparent transparent;font-size:0; line-height:0;}
+        .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
+        .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
+        .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
+        .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
+        .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
+        .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
+        .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent  transparent  transparent #32a3d8;font-size:0; line-height:0;}
+        .time-line-list>li:first-child .arrow{display: none;}
+        .table-bg th{background-color: #e2f6ff;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+        .msg-phone{height: 35px;line-height: 35px;}
+        .col-sm-1{width: 150px;}
+
+        .all_down{text-decoration: underline;color: #f00;}
+    </style>
+    <title>添加订单 - 订单管理 - RST</title>
+</head>
+<body>
+<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
+    <span class="c-gray en">/</span> 订单管理
+    <span class="c-gray en">/</span> 添加订单
+    <a class="btn radius r"
+       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
+    <a class="btn radius r"
+       href="javascript:history.back(-1);" title="后退"><i class="Hui-iconfont">&#xe6d4;</i></a>
+</nav>
+<article class="page-container" style="padding: 10px;">
+    <div class="pd-20 cl">
+        <form action="${path}/admin/salesOrder/add_salesOrder" method="post" class="form form-horizontal" id="form-order-add"  onkeydown="if(event.keyCode==13)return false;">
+
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">订单基本信息</div>
+                </label>
+                <div class="formControls col-9">
+                </div>
+            </div>
+
+            <div class="row cl" style="">
+                <label class="form-label col-1 col-sm-1">订单类型:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select" id="salesOrderStatus" name="salesOrderStatus" >
+                            <option value="1" >正常订单</option>
+                            <#if admin.adminDept == 3 || admin.adminDept == 1><option value="2" >售后订单</option></#if>
+                        </select>
+				    </span>
+                </div>
+            </div>
+            <div class="row cl" id="salesCustomer" style="display: none;">
+                <label class="form-label col-1 col-sm-1"></label>
+                <div class="formControls col-2 col-sm-2" style="margin-left: 11.3%;width: 100%;color: #c00;">
+                    <div class="formControls col-1 col-sm-1" id="selectCustomer" style="display: none;">
+                        <input type="button" style="color: #32a3d8;border: 1px solid #32a3d8;" class="btn" onclick="add_customer()" value="选择客诉">
+                    </div>
+                    <span id="salesCustomerIdHtml"></span>
+                    <input type="hidden" id="salesCustomerId" name="salesCustomerId" value="">
+                </div>
+            </div>
+
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1">批次编号:</label>
+                <div class="formControls col-2 col-sm-2" 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 sales_channel" id="" style="">
+                    <label class="form-label col-1 col-sm-1">销售渠道:</label>
+                    <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select init_company" name="salesCompanyId" id="salesCompanyId" defValue="">
+                            <option value="4">上朵</option>
+                        </select>
+                        <input type="hidden" class="init_typeCompanyId" id="init_typeCompanyId" value="4" name="init_typeCompanyId">
+				    </span>
+                    </div>
+                    <#--<div class="formControls col-2 col-sm-2">
+                    <span class="select-box">
+                        <select  class="select init_store"  name="salesStoreId" id="">
+                        </select>
+                    </span>
+                    </div>-->
+                    <div class="formControls col-2 col-sm-2">
+                        <input id="store_1" name="maktMaktx" class="input-text" list="datalist_1" value="" placeholder="输入店铺关键字或双击" datatype="*1-20"  />
+                            <datalist class="select init_store" id="datalist_1">
+                            <#list storeInfoList as storeInfo>
+                                <option value="${storeInfo.storeName}" data-id="${storeInfo.storeId}" >${storeInfo.storeName}</option>
+                            </#list>
+                            </datalist>
+                            <input type="hidden" id="salesStoreId" name="salesStoreId">
+                    </div>
+                </div>
+
+            <div class="row cl" id="" style="">
+                <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>
+                <div class="formControls col-2 col-sm-2">
+                    <input type="text" class="input-text" value="" placeholder="填写收件人手机号" id="salesAddressTel" name="salesAddressTel" datatype="*1-20" errormsg="联系人电话格式不正确!">
+                </div>
+            </div>
+
+          <div class="row cl address_info" id="" style="">
+                <label class="form-label col-1 col-sm-1">地址信息:</label>
+                <div class="formControls col-2 col-sm-2" >
+                    <span class="select-box">
+                        <select class="select init_province" id="addressProvince"  >
+                        </select>
+				    </span>
+                </div>
+                <div class="formControls col-2 col-sm-2">
+                    <span class="select-box">
+                        <select  class="select init_city" id="addressCity"   >
+                        </select>
+                    </span>
+                </div>
+                <div class="formControls col-2 col-sm-2">
+                    <span class="select-box">
+                        <select  class="select init_country" id="addressCountry" >
+                        </select>
+				    </span>
+                </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" style="height: 50px;" 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" value="">
+            </div>
+
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">支付时间:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <input type="text" placeholder="购买日期" id="salesPayTime"  name="payTime" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate: '%y-%M-%d'})"  readonly="readonly">
+                </div>
+                <label class="form-label col-2 col-sm-2">支付方式:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select" id="salesPayType" name="salesPayType">
+                            <#--1:微信支付 2:现金支付3:已支付定金¥99 4:刷卡支付 5:支付宝支付-->
+                            <option value="1">微信支付</option>
+                            <option value="2">现金支付</option>
+                            <option value="4">刷卡支付</option>
+                            <option value="5">支付宝支付</option>
+                        </select>
+				    </span>
+                </div>
+            </div>
+
+
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">产品信息</div>
+                </label>
+                <div class="formControls col-9">
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">产品信息:</label>
+                <div class="formControls col-8 col-sm-8">
+                    <input type="button" style="color: #32a3d8;border: 1px solid #32a3d8;" class="btn add-order-button" onclick="add_sdproduct()" value="添加产品" >
+                    <table class="table table-border table-bg table-bordered" style="margin-top: 10px;display: none" id="all_add_product">
+                        <thead>
+                            <tr class="text-c" id="table1">
+                                <th style="text-align: center;" width="30" >产品名称</th>
+                                <th style="text-align: center;" width="25" >产品颜色</th>
+                                <th style="text-align: center;" width="10">售价</th>
+                                <th style="text-align: center;" width="10">产品编码</th>
+                                <th style="text-align: center;" width="10">数量</th>
+                                <th style="text-align: center;" width="10">操作</th>
+                            </tr>
+                        </thead>
+                        <tbody id="add_product">
+                        </tbody>
+                    </table>
+                    <input type="hidden" id="orderItemString" name="orderItemString" value="" >
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <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="总金额" datatype="*" errormsg="必须要输入总金额!" id="salesAmount" name="salesAmount"  >
+                </div>
+                <label class="form-label col-2 col-sm-2">实付金额:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <input type="text" class="input-text" value="0" placeholder="实付金额" datatype="*" errormsg="必须要输入总金额!" id="salesPayMoney" name="salesPayMoney"  >
+                </div>
+                <div class="formControls col-2 col-sm-2" style="display: none">
+                    <input type="text" class="input-text" value="0" placeholder="优惠金额" datatype="*" errormsg="必须要输入总金额!" id="salesDiscountMoney" name="salesDiscountMoney"  >
+                </div>
+
+                <div class="formControls col-2 col-sm-2">
+                    <input type="button" style="color: #32a3d8;border: 1px solid #32a3d8;" class="btn add-order-button" onclick="calculatePrice()" value="计算产品总价" >
+                </div>
+            </div>
+
+            <input type="hidden" class="input-text" value="0" placeholder="待付金额" id="salesWaitMoney" name="salesWaitMoney"  >
+            <input type="hidden" class="input-text" value="0" placeholder="本次支付金额" id="salesLastMoney" name="salesLastMoney"  >
+            <input type="hidden" class="input-text" value="0" placeholder="邮费" id="salesShippingFee" name="salesShippingFee"  >
+
+            <div class="row cl">
+                <label class="form-label col-3">
+                    <div class="tit-2">备注信息</div>
+                </label>
+                <div class="formControls col-9">
+                </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="salesUserRemark" id="salesUserRemark" cols="" rows="2"  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" class="textarea" placeholder="请填写后台备注,最多支持100字符" onKeyUp="$.Huitextarealength(this,100)"></textarea>
+                    <#--<span id="addrssMsg"></span>-->
+                </div>
+            </div>
+
+            <div class="row cl">
+                <div class="col-2 col-sm-2 col-offset-3">
+                    <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
+                </div>
+            </div>
+        </form>
+    </div>
+</article>
+
+<script type="text/javascript">
+    var url_path = "${path}";
+</script>
+<#--时间控件-->
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+
+
+
+<script type="text/javascript">
+    var date = new Date();
+    var newyear = date.getFullYear();
+    var newmonth = date.getMonth() + 1;
+    var day = date.getDate();
+    var hours = date.getHours(); //获取当前小时数(0-23)
+    var minutes = date.getMinutes(); //获取当前分钟数(0-59)
+    var seconds = date.getSeconds(); //获取当前秒数(0-59)
+    newmonth = (newmonth<10 ? "0"+newmonth:newmonth);
+    var newdate = newyear+ "-"+newmonth + "-" + day +" "+hours+":"+minutes+":"+seconds;
+    $("#salesPayTime").val(newdate);
+    var salesCustomerId = "${salesOrder.salesCustomerId!''}";
+
+    $('.skin-minimal input').iCheck({
+        checkboxClass: 'icheckbox-blue',
+        radioClass: 'iradio-blue',
+        increaseArea: '20%'
+    });
+    var ulc = initAddress($(".address_info"));
+    /*var sc = $(".sales_channel").initSalesChannel();*/
+    
+    $(function () {
+       if(isEmpty(salesCustomerId)){
+           setSelectCustomer(salesCustomerId);
+       }
+    })
+
+    $("#store_1").on("input",function(){
+        var $options=$("#datalist_1").children();
+
+        for(var i=0;i<$options.length;i++){
+            if($options.eq(i).val().trim()==$("#store_1").val().trim()){
+                $("#salesStoreId").val($options.eq(i).attr("data-id"));
+                break;
+            }else{
+                $("#salesStoreId").val("");
+            }
+        }
+    });
+
+    /*如果修改信息时匹配地址出现失败,由此标识提醒一次,添加订单不需要次标识*/
+    var isNameCorrect = true;
+
+</script>
+
+
+<script type="text/javascript" charset="utf-8" src="${path}/common/js/salesOrder/salesOrder.js"></script>
+
+
+</body>
+</html>

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

@@ -86,7 +86,6 @@
                     </tbody>
                 </table>
             </div>
-
         </form>
     </div>
 </article>

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

@@ -91,7 +91,7 @@
                          <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="searchOrder" name="">搜索</button>
                      </div>
                 </div>
-
+                <input type="hidden" class="input-text" value="${typeCompany!''}"  id="typeCompany" name="typeCompany"  >
             </form>
         </div>
 
@@ -162,6 +162,7 @@
         var colorName = cufte($("#colorName").val());
         var colorBar = cufte($("#colorBar").val());
         var productType = cufte($("#productType").val());
+        var typeCompany = cufte($("#typeCompany").val());
 
         $.ajax({
             type: "POST",
@@ -169,7 +170,8 @@
                 productName : productName,
                 colorName : colorName,
                 colorBar : colorBar,
-                productType : productType
+                productType : productType,
+                typeCompany : typeCompany
             },
             url: "${path}/admin/product/get_product",
             success: function(data){

File diff suppressed because it is too large
+ 922 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_sdorder_list.ftl


+ 3 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/order/statistics/deliver_statistics.ftl

@@ -89,7 +89,7 @@
                     </tbody>
                 </table>
             </div>
-
+            <input type="hidden"  value="${salesCompanyId!''}" id="salesCompanyId" name="salesCompanyId">
         </form>
     </div>
 </article>
@@ -109,10 +109,11 @@
         loadIndex = layer.load(1, {
             shade: [0.5,'#fff'] //0.1透明度的白色背景
         });
+        var salesCompanyId = $("#salesCompanyId").val();
         $.ajax({
             type:'POST',
             url: '${path}/admin/await_send/getDeliverNum',
-            data:{},
+            data:{"salesCompanyId" : salesCompanyId},
             dataType: 'json',
             success:function(res) {
                 for(var i=0;i<res.returnMsg.allList.length;i++){

+ 2 - 1
watero-rst-web/src/main/webapp/common/js/common/salesChannel.js

@@ -20,7 +20,8 @@
         initCompany:function(){
             var salesChannel = this;
             var $companyNode = $(this.options.companyNode);
-            $.get(root_path +"/admin/salesChannel/select_company", function(result){
+            var typeCompanyId = $("#init_typeCompanyId").val();
+            $.get(root_path +"/admin/salesChannel/select_company?companyId="+cufte(typeCompanyId), function(result){
                 if (result.returnCode == 200) {
                     $companyNode.empty();    //清空下拉框
                     $(result.returnMsg.companyInfoList).each(function (){

+ 6 - 0
watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js

@@ -8,6 +8,12 @@ var allCustomerId = "";
 function add_product() {
     layer_show("商品列表",url_path + "/admin/salesOrder/to_add_product","1000","500");
 }
+/**
+ * 打开商品列表
+ */
+function add_sdproduct() {
+    layer_show("商品列表",url_path + "/admin/salesOrder/to_add_product?typeCompany=4","1000","500");
+}
 
 /**
  * 打开客诉列表