瀏覽代碼

客户系统

wangxiaoming 5 年之前
父節點
當前提交
3e65c74c95

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

@@ -30,6 +30,9 @@ public class StoreInfo implements Serializable {
     //发货人地址
     private String storeShipAddress;
 
+    //客户id
+    private Integer dealerId;
+
     public CompanyInfo getCompanyInfo() {
         return companyInfo;
     }
@@ -133,4 +136,12 @@ public class StoreInfo implements Serializable {
     public void setStoreShipAddress(String storeShipAddress) {
         this.storeShipAddress = storeShipAddress;
     }
+
+    public Integer getDealerId() {
+        return dealerId;
+    }
+
+    public void setDealerId(Integer dealerId) {
+        this.dealerId = dealerId;
+    }
 }

+ 3 - 3
watero-rst-core/src/main/java/com.iamberry.rst.core/dm/ClaimOrder.java

@@ -17,11 +17,11 @@ public class ClaimOrder  implements  Serializable{
     private Integer claimOrderId;
     //财务收款id
     private Integer frId;
-    //订单项表
+    //订单项表/退货费用
     private Integer itemId;
-    //供应价格
+    //供应价格/退货邮费费用
     private Integer frPrice;
-    //类型 1:正常 2:退货
+    //类型 1:正常 2:退货 3:退货邮费
     private Integer claimOrderType;
     //产品数量 当类型为退货时,为退货数量
     private Integer claimOrderNum;

+ 6 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/StoreInfoService.java

@@ -15,6 +15,12 @@ public interface StoreInfoService {
      * @return
      */
     List<StoreInfo> listStore(StoreInfo storeInfo);
+    /**
+     * 根据条件查询店铺信息
+     * @param storeInfo
+     * @return
+     */
+    List<StoreInfo> listStoreByDealer(StoreInfo storeInfo);
 
     /**
      * 根据id查询店铺信息

+ 5 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/StoreInfoServiceImpl.java

@@ -28,6 +28,11 @@ public class StoreInfoServiceImpl implements StoreInfoService {
     }
 
     @Override
+    public List<StoreInfo> listStoreByDealer(StoreInfo storeInfo) {
+        return storeInfoMapper.listStoreByDealer(storeInfo);
+    }
+
+    @Override
     public StoreInfo getStoreInfoById(Integer storeEfast) {
         return storeInfoMapper.getStoreInfoById(storeEfast);
     }

+ 8 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/StoreInfoMapper.java

@@ -40,4 +40,12 @@ public interface StoreInfoMapper {
      * @return
      */
     List<StoreInfo> listStore(StoreInfo storeInfo);
+
+
+    /**
+     * 根据条件查询店铺信息
+     * @param storeInfo
+     * @return
+     */
+    List<StoreInfo> listStoreByDealer(StoreInfo storeInfo);
 }

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

@@ -58,6 +58,41 @@
     </where>
   </select>
 
+  <!-- 根据条件查询店铺信息 -->
+  <select id="listStoreByDealer" parameterType="StoreInfo" resultType="StoreInfo">
+    select
+      *
+    from
+      tb_rst_store_info
+    <where>
+      <if test="storeEfast != null">
+        store_efast = #{storeEfast}
+      </if>
+      <if test="storeStatus != null">
+        and store_status = #{storeStatus}
+      </if>
+      <if test="companyId != null and companyId != ''">
+        and company_id = #{companyId}
+      </if>
+      <if test="storeName != null">
+        and store_name LIKE CONCAT('%',#{storeName},'%')
+      </if>
+      <if test="dealerId != null">
+        and  store_id IN (
+          select
+            distinct t.store_id
+          from
+            tb_rst_store_info t
+          LEFT JOIN tb_rst_dm_dealer_channel_store dcs ON t.store_id = dcs.store_id
+          LEFT JOIN tb_rst_dm_dealer_channel dc ON dcs.deal_channel_id = dc.deal_channel_id
+          WHERE dc.dealer_id = #{dealerId}
+        )
+      </if>
+
+
+    </where>
+  </select>
+
   <!-- 添加店铺信息 -->
   <insert id="addStoreInfo" parameterType="StoreInfo"  useGeneratedKeys="true"  keyProperty="storeId">
     insert into tb_rst_store_info (store_id, company_id, store_efast, 

+ 61 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/dm/FinanciaReceController.java

@@ -2,6 +2,7 @@ package com.iamberry.rst.controllers.dm;
 
 import com.iamberry.rst.core.cm.CompanyInfo;
 import com.iamberry.rst.core.cm.SalesOrder;
+import com.iamberry.rst.core.cm.StoreInfo;
 import com.iamberry.rst.core.dm.ClaimOrder;
 import com.iamberry.rst.core.dm.DmDealer;
 import com.iamberry.rst.core.dm.FinancialReceipt;
@@ -10,6 +11,7 @@ import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.core.sys.Admin;
 import com.iamberry.rst.faces.cm.CompanyInfoService;
 import com.iamberry.rst.faces.cm.SalesOrderService;
+import com.iamberry.rst.faces.cm.StoreInfoService;
 import com.iamberry.rst.faces.dm.*;
 import com.iamberry.rst.faces.sys.SysService;
 import com.iamberry.rst.utils.AdminUtils;
@@ -53,6 +55,8 @@ public class FinanciaReceController {
     private DealerProductService dealerProductService;
     @Autowired
     private CompanyInfoService companyInfoService;
+    @Autowired
+    private StoreInfoService storeInfoService;
 
 
     /**
@@ -231,6 +235,9 @@ public class FinanciaReceController {
         mv.addObject("frId",frId);
         mv.addObject("type",type);
 
+        FinancialReceipt fr = financialReceiptService.getFinancialReceiptById(frId);
+        mv.addObject("fr",fr);
+
         //获取登录员工id
         Integer adminId = AdminUtils.getLoginAdminId();
 
@@ -433,4 +440,58 @@ public class FinanciaReceController {
         return mv;
     }
 
+    /**
+     * 到选择订单页面
+     * @param request
+     * @return
+     */
+    @RequestMapping("/to_select_post")
+    public ModelAndView toSelectPost(HttpServletRequest request,Integer dealerId){
+        ModelAndView mv = new ModelAndView("dm/financialReceipt/select_post_list");
+        //获取销售公司
+//        List<CompanyInfo> companyInfoList = companyInfoService.listCompanyInfo(new CompanyInfo());
+//        mv.addObject("companyInfoList", companyInfoList);
+
+        DmDealer dmDealer = new DmDealer();
+        dmDealer.setDealerStatus(1);
+        List<DmDealer>  dmDealerList = dmDealerService.getDmDealerList(dmDealer);
+
+        mv.addObject("dmDealerList", dmDealerList);
+        mv.addObject("dealerId", dealerId);
+        return mv;
+    }
+
+    /**
+     * 获取店铺集合
+     * @param request
+     * @param storeInfo
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/select_storeInfo_by_dealer")
+    public ResponseJson selectStoreInfoByDealer(HttpServletRequest request, StoreInfo storeInfo) {
+        storeInfo.setStoreStatus(1);
+        List<StoreInfo> storeInfoList = storeInfoService.listStoreByDealer(storeInfo);
+        ResponseJson rj = new ResponseJson(200, "查询成功", 200);
+        rj.addResponseKeyValue("storeInfoList", storeInfoList);
+        return rj;
+    }
+
+    /**
+     * 获取邮费列表
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/select_post")
+    public ResponseJson selectPost(HttpServletRequest request) {
+        ResponseJson rj = new ResponseJson(200, "查询成功", 200);
+//        List<StoreInfo> storeInfoList = storeInfoService.listStoreByDealer(storeInfo);
+//
+//        rj.addResponseKeyValue("storeInfoList", storeInfoList);
+        return rj;
+    }
+
+
+
 }

+ 66 - 15
watero-rst-web/src/main/webapp/WEB-INF/views/dm/financialReceipt/claim_delaer.ftl

@@ -44,29 +44,58 @@
 
 <article class="page-container" style="padding: 10px;">
     <div class="pd-20 cl" style="padding-top: 0px;">
-        <form action="${path}/admin/financial_receipt/claim_delaer" method="post" class="form form-horizontal" id="form-fr"  onkeydown="if(event.keyCode==13)return false;">
+        <form  method="post" class="form form-horizontal" id="form-fr"  onkeydown="if(event.keyCode==13)return false;">
 
-            <input type="hidden" name="frId" value="${frId}">
-            <input type="hidden" name="type" value="${type}">
+            <input type="hidden" name="frId" id="frId" value="${frId}">
+            <input type="hidden" name="type" id="type" value="${type}">
 
-            <div class="row cl" id="" style="margin-top: 40px">
-                <label class="form-label col-xs-3 col-sm-3" style="text-align: right;"><span class="c-red">*</span>回款客户:</label>
-                <div class="formControls col-xs-8 col-sm-8" >
+            <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-5 col-sm-5" style="padding-top: 3px;">
+                    ${fr.frBank!''}
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">回款金额:</label>
+                <div class="formControls col-5 col-sm-5" style="padding-top: 3px;">
+                ${((fr.frAmount/100)?string("0.##"))!''}
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">打款备注:</label>
+                <div class="formControls col-5 col-sm-5" style="padding-top: 3px;">
+                ${fr.frBank!''}
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>所属客户:</label>
+                <div class="formControls col-3 col-sm-3" style="padding-top: 3px;">
                     <span class="select-box">
                          <select name="dealerId" class="select chosen" id="dealerId">
-                            <#if dmDealerList?? &&  (dmDealerList?size > 0) >
-                                <#list dmDealerList as dmDealer >
-                                    <option value="${dmDealer.dealerId}">${dmDealer.dealerName}</option>
-                                </#list>
-                            </#if>
+                             <#if dmDealerList?? &&  (dmDealerList?size > 0) >
+                                 <#list dmDealerList as dmDealer >
+                                     <option value="${dmDealer.dealerId}">${dmDealer.dealerName}</option>
+                                 </#list>
+                             </#if>
                          </select>
 				    </span>
                 </div>
             </div>
 
            <div class="row cl" style="margin-top: 50px">
-               <div class="col-4 col-sm-4 col-offset-4" >
-                   <button type="submit" class="btn btn-primary " style="width: 100%;" >保存</button>
+               <div class="col-2 col-sm-2 col-offset-1" >
+                   <button type="button" class="btn btn-primary " style="width: 100%;" onclick="submitDelaerClaim()" >下一步</button>
                </div>
            </div>
 
@@ -79,7 +108,7 @@
 </script>
 <script type="text/javascript">
 
-    $(function(){
+    /*$(function(){
         var loadIndex = 0;
         $("#form-fr").Validform({
             tiptype: function (msg, o, cssctl) {
@@ -117,7 +146,29 @@
                 return false;
             }
         });
-    });
+    });*/
+
+
+    function submitDelaerClaim() {
+        var frId = $("#frId").val();
+        var dealerId = $("#dealerId").val();
+        $.ajax({
+            type: "POST",
+            data: {
+                frId:frId,
+                dealerId:dealerId,
+                type:1
+            },
+            url: "${path}/admin/financial_receipt/claim_delaer",
+            async: false,
+            success: function(data){
+                window.location.href= "${path}/admin/financial_receipt/to_order_desc?frId="+frId;
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.close(index);
+            }
+        });
+    }
 </script>
 
 

+ 2 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/dm/financialReceipt/fr_list.ftl

@@ -132,7 +132,7 @@
                             </#if>
 
                                 <#if financialReceipt.frClaimStatus == 2>
-                                       <a style="text-decoration:none" href="javascript:void(0);" title="绑定客户" onclick="claimDelaer(${financialReceipt.frId!''},1)">
+                                       <a style="text-decoration:none" href="javascript:void(0);" title="认款" onclick="claimDelaer(${financialReceipt.frId!''},1)">
                                             <font color=#06c>认款</font>
                                        </a>
                                 </#if>
@@ -200,7 +200,7 @@
      * 跳转到认款
      */
     function claimDelaer(frId,type){
-        layer_show_norm("认款","${path}/admin/financial_receipt/to_claim_delaer?frId="+frId+"&type="+type,2);
+        window.location.href = "${path}/admin/financial_receipt/to_claim_delaer?frId="+frId+"&type="+type
     }
 
     /**

+ 40 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/dm/financialReceipt/order_desc.ftl

@@ -222,6 +222,38 @@
                 </div>
             </div>
 
+            <div class="row cl" id="" style="">
+                <div class="formControls col-5 col-sm-5" style="padding-top: 3px;">
+                    <button type="button" class="btn btn-primary" onclick="selectOrderReturnPost()">添加退货邮费</button>
+                </div>
+            </div>
+            <div class="row cl" id="" style="">
+                <div class="formControls col-12 col-sm-12" >
+                    <table class="table table-border table-bordered table-bg table-hover table-sort">
+                        <thead>
+                        <tr class="text-c">
+                            <th width="30">待结算金额</th>
+                            <th width="50">邮费金额</th>
+                            <th width="50">支付宝姓名</th>
+                            <th width="100">支付宝账号</th>
+                            <th width="30">状态</th>
+                            <th width="60">备注</th>
+                            <th width="20">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="returnAll">
+                        <#if claimOrderList?? &&  (claimOrderList?size > 0) >
+                            <#list claimOrderList as claimOrder>
+                                <#if claimOrder.claimOrderType == 2 >
+
+                                </#if>
+                            </#list>
+                        </#if>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
             <div class="row cl" id="" style="margin-left: 16px;font-weight: bold;">
                 <p class=""  id="">
                 <#--    共<span id="allNormalProduct">0</span>个正常产品,
@@ -393,6 +425,14 @@
     }
 
     /**
+     *  搜索退货订单的邮费
+     */
+    function selectOrderReturnPost() {
+        var dealerId = $("#dealerId").val();
+        layer_show("搜索邮费信息",url_path + "/admin/financial_receipt/to_select_post?dealerId="+dealerId,"1200","500");
+    }
+
+    /**
      * 计算总金额
      */
     function calculaAllAmount(){

+ 340 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/dm/financialReceipt/select_post_list.ftl

@@ -0,0 +1,340 @@
+<!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" />
+    <link rel="Bookmark" href="/favicon.ico" >
+    <link rel="Shortcut Icon" href="/favicon.ico" />
+<#include "/base/add_base.ftl">
+    <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;}
+        .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;color: #50a2ea;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 50%;height: 6px;width: 6px;border-radius: 6px;margin-top: -3px; 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;}
+
+        #suggest, #suggest2 {width:200px}
+        .gray {color:gray}
+        .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
+        .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_over, .ac_results li a:hover {background:#c8e3fc}
+        .ac_results li a span {float:right}
+        .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
+
+        .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;}
+        .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
+        .dalog-ask .answer{color: #666;margin-bottom: 10px;}
+        .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
+        .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;}
+        .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
+        .input-produce{height: 25px;line-height: 25px}
+        .color-div{height: 30px;}
+        .table-td-color{}
+        .msg-phone{
+            height: 35px;
+            line-height: 35px;
+        }
+        .select-order{text-decoration:none;color: #32A3D8;}
+        .select-order:hover{text-decoration:underline;}
+    </style>
+</head>
+<body>
+<div class="page-container">
+    <div class="order-list">
+        <div class="text-c">
+            <form action="" method="post">
+                <div class="row cl" style="margin-left: 0px;">
+
+                    <input type="hidden" class="input-text" value="${dealerId}" id="dealerId" name="dealerId">
+
+                   <#-- <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;" > <span class="select-box">
+                        <select name="companyId" class="select" id="companyId">
+                             <option value="">销售公司</option>
+                            <#if companyInfoList?? &&  (companyInfoList?size > 0) >
+                                <#list companyInfoList as companyInfo>
+                                    <option value ="${companyInfo.companyId!""}">${companyInfo.companyName!""}</option>
+                                </#list>
+                            </#if>
+                        </select>
+                        </span>
+                    </div>-->
+
+                    <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;" > <span class="select-box">
+                        <select name="dealerId" class="select" id="dealerId">
+                             <option value="">选择客户</option>
+                            <#if dmDealerList?? &&  (dmDealerList?size > 0) >
+                                <#list dmDealerList as dmDealer>
+                                    <option value ="${dmDealer.dealerId!""}">${dmDealer.dealerName!""}</option>
+                                </#list>
+                            </#if>
+                        </select>
+                        </span>
+                    </div>
+
+                    <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;">
+                        <span class="select-box">
+                            <select name="storeId" class="select" id="storeId">
+
+                            </select>
+                        </span>
+                    </div>
+
+                    <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;"> <span class="select-box">
+                        <select name="storeId" class="select" id="storeId">
+                            <option></option>
+                        </select>
+                        </span>
+                    </div>
+
+                    <div class="formControls col-4 col-sm-4" style="padding: 0px 10px 0px 0px; width: 125px;">
+                        <input type="text" style="width:120px;height:30px;margin-right: 0px;font-size: 9px;" name="startDate" id="startDate" class="input-text" placeholder="开始时间(客诉创建日期)" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss'})"  readonly="readonly"/>
+                    </div>
+                    <div class="formControls col-4 col-sm-4" style="padding: 0px 10px 0px 0px; width: 125px;">
+                        <input type="text" style="width:120px;height:30px;margin-right: 0px;font-size: 9px;" name="endDate" id="endDate" class="input-text" placeholder="结束时间(客诉创建日期)" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss'})"  readonly="readonly"/>
+                    </div>
+
+
+
+
+
+                    <div class="formControls col-2 col-sm-2"  style="padding: 0px 10px 0px 0px; width: 110px;">
+                        <input type="text" class="input-text" value="" placeholder="订单号" id="salesOrderId" name="">
+                    </div>
+
+                     <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;" >
+                         <input type="text" class="input-text" value="" placeholder="收货人姓名" id="salesAddressName" name="">
+                     </div>
+                     <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;">
+                         <input type="text" class="input-text" value="" placeholder="收货人电话" id="salesAddressTel" name="">
+                     </div>
+
+
+                     <div class="formControls col-1 col-sm-1" >
+                         <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="searchOrder" name="">搜索</button>
+                     </div>
+                </div>
+            </form>
+        </div>
+
+        <div class="mt-20" style="height: 330px;overflow: auto;overflow-x: hidden;margin-bottom: 12px;border: 1px solid #ddd;">
+            <table class="table table-border table-bordered table-bg table-hover table-sort">
+                <thead>
+                <tr class="text-c">
+                    <th width="10"><input type="checkbox" class="selectAll" id="selectAll" value="selectAll" ></th>
+                    <th width="50">客诉ID</th>
+                    <th width="50">邮费金额</th>
+                    <th width="50">支付宝姓名</th>
+                    <th width="100">支付宝账号</th>
+                    <th width="100">转账类型</th>
+                    <th width="60">状态</th>
+                    <th width="80">备注</th>
+                    <th width="80">创建时间</th>
+                </tr>
+                </thead>
+                <tbody id="orderAll">
+
+                     <tr class="text-c">
+                         <td colspan="12">请输入搜索条件,搜索邮费信息~
+                         </td>
+                     </tr>
+
+                </tbody>
+            </table>
+        </div>
+
+        <div class="formControls col-1 col-sm-1" style="margin-left: 45%;">
+            <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="selectOrderInfo()">确认选择</button>
+        </div>
+    </div>
+
+</div>
+
+<tfoot>
+</tfoot>
+
+<#--时间控件-->
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+
+<script>
+
+    $(function () {
+        /*选择店铺*/
+        $("[name='dealerId']").change(function (){
+            var dealerId = $(this).val();
+            setStore(dealerId,$("#storeId"));       //获取店铺
+        });
+
+        /*搜索*/
+        $(document).on('click', '#searchOrder', function() {
+            searchOrder();
+        });
+
+        /*回车搜索*/
+        $('.input-text').keydown(function(event){
+            if(event.keyCode == 13){ //绑定回车
+                $('#searchOrder').click();
+            }
+        });
+    })
+
+    /**
+     * 搜索订单
+     */
+    function searchOrder(){
+        var index = layer.load(1, {
+            shade: [0.5,'#fff'] //0.1透明度的白色背景
+        });
+
+        var salesCompanyId = cufte($("#companyId").val());
+        var salesStoreId = cufte($("#storeId").val());
+        var salesOrderStatus = cufte($("#salesOrderStatus").val());
+        var salesStatus = cufte($("#salesStatus").val());
+        var salesId = cufte($("#salesId").val());
+        var salesAddressName =cufte($("#salesAddressName").val());
+        var salesAddressTel = cufte($("#salesAddressTel").val());
+        var salesOrderId = cufte($("#salesOrderId").val());
+        var startDate = cufte($("#startDate").val());
+        var endDate = cufte($("#endDate").val());
+
+        $.ajax({
+            type: "POST",
+            data: {
+                salesCompanyId : salesCompanyId,
+                salesStoreId : salesStoreId,
+                salesOrderStatus : salesOrderStatus,
+                salesStatus : salesStatus,
+                salesId : salesId,
+                salesOrderId : salesOrderId,
+                salesAddressName : salesAddressName,
+                salesAddressTel : salesAddressTel,
+                startDate : startDate,
+                endDate : endDate,
+                orderDateType : 1,
+                pageSize : 100
+            },
+            url: "${path}/admin/salesOrder/select_order_page",
+            async: true,
+            success: function(data){
+                var html = "";
+                if (data.returnCode == 200 && data.returnMsg.pagedResult.dataList.length > 0 ) {
+                    for(var i=0;i<data.returnMsg.pagedResult.dataList.length;i++){
+                        var salesOrder = data.returnMsg.pagedResult.dataList[i];
+                        var disHtml =  "";
+                        var productsHtml = '';
+                        var salesOrderItem = salesOrder.salesOrderItemList;
+                        for(var j=0;j<salesOrderItem.length;j++){
+                            var item = interceptToString(salesOrderItem[j].itemProductName) +'('+salesOrderItem[j].itemProductColor+ ")*" + salesOrderItem[j].itemNum;
+                                productsHtml += '<span class="label label-success radius" title="'+ salesOrderItem[j].itemProductName +'('+salesOrderItem[j].itemProductColor+')*'+ (salesOrderItem[j].itemNum - salesOrderItem[j].itemReturnNum) +'">' + item + '</span>';
+                        }
+                        var time = formatDate(new Date(salesOrder.salesPayTime),"yyyy-MM-dd");
+                        var orderStatus = null;
+                        if(salesOrder.procTypeId == 0 || salesOrder.procTypeId == null || salesOrder.procTypeId == ""){
+                            orderStatus = "正常";
+                        }else{
+                            orderStatus = salesOrder.procTypeName;
+                        }
+
+                        if(salesOrder.salesStatus != 1){
+                            disHtml = 'disabled="disabled" title="只能选择已确认的订单" ';
+                        }
+                        html += '<tr class="text-c">' +
+                                ' <td><input type="checkbox" class="sales_order_id" title="" id="" value="'+ salesOrder.salesId +'" '+ disHtml  +'></td>' +
+                                ' <td>'+ cufte(salesOrder.companyName) +'</td>' +
+                                ' <td>'+ cufte(salesOrder.storeName) +'</td>' +
+                                ' <td>'+ cufte(salesOrder.salesOrderId) +'</td>' +
+                                ' <td>'+ salesOrder.salesDealCode +'</td>' +
+                                ' <td>'+ salesOrder.salesAddressName +'</td>' +
+                                ' <td>'+ salesOrder.salesAddressTel +'</td>' +
+                                ' <td>'+ salesOrder.salesAmount/100 +'</td>' +
+                                ' <td>'+ productsHtml +'</td>' +
+                                ' <td>'+ time +'</td>' +
+                                ' <td>'+ orderStatus +'</td>' +
+                                ' <td>'+ salesOrder.salesAddressInfo +'</td>' +
+                                ' </tr>';
+                    }
+                }else{
+                    html = '<tr class="text-c"><td colspan="12">没有搜索到订单,请点击“添加订单”按钮,添加订单。</td></tr>';
+                }
+                $("#orderAll").html(html);
+                layer.close(index);
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.close(index);
+            }
+        });
+    }
+
+    /**
+     * 选择订单,返回订单内容到父级
+     */
+    function selectOrderInfo() {
+        var orderIds = "";
+        $(".sales_order_id").each(function(){
+            if($(this).is(':checked')){
+                orderIds += $(this).val() + "_";
+            }
+        })
+        parent.showSelectOrder(orderIds);
+        parent.layer.close(parent.layer.getFrameIndex(window.name));
+    }
+
+    function toSearch(){
+        $(".order-add").hide();
+        $(".order-list").show();
+    }
+</script>
+
+
+<script>
+    /**
+     * 展示销售公司
+     */
+    function setStore(dealerId,node){
+        var dealerId = $("#dealerId").val();
+        var html = '<option value="">店铺</option>';
+        $.ajax({
+            type: "POST",
+            data: {
+                dealerId : dealerId
+            },
+            url: "${path}/admin/financial_receipt/select_storeInfo_by_dealer",
+            success: function(data){
+                var id;
+                if (data.returnCode == 200) {
+                    for(var i=0;i<data.returnMsg.storeInfoList.length;i++){
+                        var storeInfo = data.returnMsg.storeInfoList[i];
+                        html += '<option value="'+ storeInfo.storeId +'">'+ storeInfo.storeName +'</option>';
+                    }
+                }else{
+                    html = '';
+                }
+                $(node).html(html);
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
+
+
+
+</script>
+</body>
+</html>