wangxiaoming 5 éve
szülő
commit
a8bb8cd338

+ 21 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/dm/FinancialReceipt.java

@@ -16,13 +16,17 @@ public class FinancialReceipt  implements  Serializable{
     private Integer frId;
     //客户信息
     private Integer dealerId;
+    //客户信息
+    private String dealerName;
     //认领人
     private Integer frClaimAdminId;
+    //认领人
+    private String frClaimAdminName;
     //认领时间
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date frClaimDate;
-    //认领状态 1:已认领   2:未认领
+    //认领状态 1:已认领   2:未认领  3:绑定订单
     private Integer frClaimStatus;
     //回款账号
     private String frBank;
@@ -128,4 +132,20 @@ public class FinancialReceipt  implements  Serializable{
     public void setFrClaimStatus(Integer frClaimStatus) {
         this.frClaimStatus = frClaimStatus;
     }
+
+    public String getFrClaimAdminName() {
+        return frClaimAdminName;
+    }
+
+    public void setFrClaimAdminName(String frClaimAdminName) {
+        this.frClaimAdminName = frClaimAdminName;
+    }
+
+    public String getDealerName() {
+        return dealerName;
+    }
+
+    public void setDealerName(String dealerName) {
+        this.dealerName = dealerName;
+    }
 }

+ 20 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/dm/mapper/financialReceiptMapper.xml

@@ -27,10 +27,15 @@
         t.create_admin_id,
         t.create_date
     </sql>
+
     <select id="getFinancialReceiptList" resultMap="BaseResultMap" parameterType="FinancialReceipt" >
         select
-        <include refid="Base_List" />
+        <include refid="Base_List" />,
+        sa.admin_name AS frClaimAdminName,
+        dd.dealer_name
         from tb_rst_dm_financial_receipt t
+        LEFT JOIN tb_rst_sys_admin sa ON  t.fr_claim_admin_id = sa.admin_id
+        LEFT JOIN tb_rst_dm_dealer dd ON  t.dealer_id = dd.dealer_id
         <where>
             <if test="frId != null ">
                 AND t.fr_id = #{frId}
@@ -56,14 +61,27 @@
             <if test="createAdminId != null ">
                 AND t.create_admin_id = #{createAdminId}
             </if >
+            <if test="dealerName != null and dealerName != ''">
+                AND dd.dealer_name  like  CONCAT ('%',#{dealerName},'%')
+            </if >
+            <if test="frClaimAdminName != null and frClaimAdminName != ''">
+                AND  sa.admin_name  like  CONCAT ('%',#{frClaimAdminName},'%')
+            </if >
         </where>
+        ORDER BY t.fr_id DESC
     </select>
+
     <select id="getFinancialReceiptById" resultMap="BaseResultMap" parameterType="Integer" >
         select
-        <include refid="Base_List" />
+        <include refid="Base_List" />,
+        sa.admin_name AS frClaimAdminName,
+        dd.dealer_name
         from tb_rst_dm_financial_receipt t
+        LEFT JOIN tb_rst_sys_admin sa ON  t.fr_claim_admin_id = sa.admin_id
+        LEFT JOIN tb_rst_dm_dealer dd ON  t.dealer_id = dd.dealer_id
         where t.fr_id= #{frId}
     </select>
+
     <insert id="save" parameterType="FinancialReceipt" >
         insert into
         tb_rst_dm_financial_receipt

+ 142 - 53
watero-rst-web/src/main/java/com/iamberry/rst/controllers/dm/FinanciaReceController.java

@@ -7,6 +7,7 @@ import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.dm.DmDealerService;
 import com.iamberry.rst.faces.dm.FinancialReceiptService;
 import com.iamberry.rst.faces.sys.SysService;
+import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.StitchAttrUtil;
 import com.iamberry.wechat.tools.ResponseJson;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -20,7 +21,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
 import java.util.List;
+import java.util.Objects;
 
 @Controller
 @RequestMapping("/admin/financial_receipt")
@@ -79,25 +82,41 @@ public class FinanciaReceController {
     }
 
     /**
-     * 添加 客户信息
+     * 添加 回款信息
      * @param request
      * @return
      */
     @ResponseBody
-    @RequiresPermissions("dm:dealer:add")
-    @RequestMapping("/dealere_save")
-    public ResponseJson dealereSave(HttpServletRequest request,DmDealer dmDealer,
-        String add_contact_json,String add_dealer_channel_json,String add_product_json,String add_coop_agree_json) {
+    @RequiresPermissions("dm:financialReceipt:add")
+    @RequestMapping("/finan_rece_save")
+    public ResponseJson finanReceSave(HttpServletRequest request, FinancialReceipt financialReceipt) {
         ResponseJson rj = ResponseJson.getSUCCESS();
 
+        //获取登录员工id
+        Integer adminId = AdminUtils.getLoginAdminId();
+        financialReceipt.setCreateAdminId(adminId);
+
+        if(financialReceipt.getDealerId() == null || financialReceipt.getDealerId() == 0){
+            financialReceipt.setFrClaimStatus(2);    //frClaimStatus
+        }else{
+            DmDealer dmDealer = dmDealerService.getDmDealerById(financialReceipt.getDealerId());
+            if(dmDealer == null){
+                rj = ResponseJson.getFAILURE();
+                rj.setResultMsg("添加回款信息,失败原因:客户信息查询失败");
+                return  rj;
+            }
+            financialReceipt.setFrClaimStatus(1);
+            financialReceipt.setFrClaimAdminId(dmDealer.getCreateId());
+            financialReceipt.setFrClaimDate(new Date());
+        }
 
         Integer flag = 0;
         try{
-//            flag = dmDealerService.save(dmDealer);
+            flag = financialReceiptService.save(financialReceipt);
         }catch (Exception e){
             e.printStackTrace();
             rj = ResponseJson.getFAILURE();
-            rj.setResultMsg("添加客户信息,失败原因:"+e.getMessage());
+            rj.setResultMsg("添加回款信息,失败原因:"+e.getMessage());
             return  rj;
         }
         if(flag > 0){
@@ -110,78 +129,132 @@ public class FinanciaReceController {
     }
 
     /**
-     *
-     * @param dmDealer
+     * to修改客户页面
      * @return
+     * @author
+     * @date
      */
-    private ResponseJson dmDealerCheck(DmDealer dmDealer){
-        ResponseJson rj = ResponseJson.getFAILURE();
-        if(dmDealer.getDealerName() == null || "".equals(dmDealer.getDealerName())){
-            rj.setResultMsg("客户名称不能为空");
-            return rj;
-        }
-        if(dmDealer.getDealerIndustry() == null || "".equals(dmDealer.getDealerIndustry())){
-            rj.setResultMsg("客户行业不能为空");
-            return rj;
-        }
-        if(dmDealer.getDealerType() == null){
-            rj.setResultMsg("客户类型不能为空");
-            return rj;
-        }
-        if(dmDealer.getDealerState() == null){
-            rj.setResultMsg("合作进度不能为空");
-            return rj;
+    @RequiresPermissions("dm:dealer:update")
+    @RequestMapping("/to_update_finan_rece")
+    public ModelAndView toUpdateDealer(HttpServletRequest request,Integer frId) {
+        ModelAndView mv = new ModelAndView("dm/financialReceipt/update_fr");
+
+        FinancialReceipt financialReceipt = financialReceiptService.getFinancialReceiptById(frId);
+        mv.addObject("financialReceipt",financialReceipt);
+
+        DmDealer dmDealer = new DmDealer();
+        dmDealer.setDealerStatus(1);
+        List<DmDealer> dmDealerList = dmDealerService.getDmDealerListToFr(dmDealer);
+        mv.addObject("dmDealerList",dmDealerList);
+
+        return mv;
+    }
+
+    /**
+     * 修改客户信息
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("dm:supplier:update")
+    @RequestMapping("/finan_rece_update")
+    public ResponseJson dealereUpdate(HttpServletRequest request,FinancialReceipt financialReceipt) {
+        ResponseJson rj = ResponseJson.getSUCCESS();
+
+        FinancialReceipt fr = financialReceiptService.getFinancialReceiptById(financialReceipt.getFrId());
+
+        if(financialReceipt.getDealerId() == null || financialReceipt.getDealerId() == 0){
+            financialReceipt.setFrClaimStatus(2);
+        }else{
+            if(!Objects.equals(fr.getDealerId(), financialReceipt.getDealerId())){
+                DmDealer dmDealer = dmDealerService.getDmDealerById(financialReceipt.getDealerId());
+                if(dmDealer == null){
+                    rj = ResponseJson.getFAILURE();
+                    rj.setResultMsg("添加回款信息,失败原因:客户信息查询失败");
+                    return  rj;
+                }
+                financialReceipt.setFrClaimStatus(1);
+                financialReceipt.setFrClaimAdminId(dmDealer.getCreateId());
+                financialReceipt.setFrClaimDate(new Date());
+            }
         }
-        if(dmDealer.getDealerSelfOperated() == null){
-            rj.setResultMsg("请选择是否自营");
-            return rj;
+
+        Integer flag = 0;
+        try{
+            flag = financialReceiptService.update(financialReceipt);
+        }catch (Exception e){
+            e.printStackTrace();
+            rj = ResponseJson.getFAILURE();
+            rj.setResultMsg("修改客户信息,失败原因:"+e.getMessage());
+            return  rj;
         }
-        if(dmDealer.getDealerRate() == null){
-            rj.setResultMsg("请选择是否自营");
+        if(flag > 0){
+            rj.setResultMsg("修改成功");
             return rj;
+        }else{
+            rj = ResponseJson.getFAILURE();
+            return  rj;
         }
-        return ResponseJson.getSUCCESS();
     }
 
-
     /**
      * to修改客户页面
      * @return
      * @author
      * @date
      */
-    @RequiresPermissions("dm:dealer:update")
-    @RequestMapping("/to_update_dealer")
-    public ModelAndView toUpdateDealer(HttpServletRequest request,Integer dealerId) {
-        ModelAndView mv = new ModelAndView("dm/dealer/update_dealer");
-
-//        mv.addObject("dmDealer",dmDealer);
-//        mv.addObject("dealerContactList",dealerContactList);
-//        mv.addObject("dealerChannelList",dealerChannelList);
-//        mv.addObject("dealerProductList",dealerProductList);
-//        mv.addObject("cooperationAgreeList",cooperationAgreeList);
+    @RequiresPermissions("dm:financialReceipt:recognize")
+    @RequestMapping("/to_claim_delaer")
+    public ModelAndView toClaimDelaer(HttpServletRequest request,Integer frId,Integer type) {
+        ModelAndView mv = new ModelAndView("dm/financialReceipt/claim_delaer");
+
+        mv.addObject("frId",frId);
+        mv.addObject("type",type);
+
+        //获取登录员工id
+        Integer adminId = AdminUtils.getLoginAdminId();
+
+        DmDealer dmDealer = new DmDealer();
+        dmDealer.setDealerStatus(1);
+        dmDealer.setCreateId(adminId);
+        List<DmDealer> dmDealerList = dmDealerService.getDmDealerListToFr(dmDealer);
+        mv.addObject("dmDealerList",dmDealerList);
         return mv;
     }
 
     /**
-     * 修改客户信息
+     * 修改认款
      * @param request
      * @return
      */
     @ResponseBody
-    @RequiresPermissions("dm:supplier:update")
-    @RequestMapping("/dealere_update")
-    public ResponseJson dealereUpdate(HttpServletRequest request,DmDealer dmDealer,
-                                    String add_contact_json,String add_dealer_channel_json,String add_product_json,String add_coop_agree_json) {
+    @RequiresPermissions("dm:financialReceipt:recognize")
+    @RequestMapping("/claim_delaer")
+    public ResponseJson claimDelaer(HttpServletRequest request,Integer frId,Integer dealerId,Integer type) {
         ResponseJson rj = ResponseJson.getSUCCESS();
 
+        //1:已认领   2:未认领
         Integer flag = 0;
-        try{
-//            flag = dmDealerService.update(dmDealer);
-        }catch (Exception e){
-            e.printStackTrace();
+        if(type == 2){
+            FinancialReceipt fr = new FinancialReceipt();
+            fr.setFrId(frId);
+            fr.setFrClaimDate(null);
+            fr.setDealerId(null);
+            fr.setFrClaimStatus(2);
+            fr.setFrClaimAdminId(null);
+            flag = financialReceiptService.update(fr);
+        }else if(type == 1){
+            Integer adminId = AdminUtils.getLoginAdminId();
+            FinancialReceipt fr = new FinancialReceipt();
+            fr.setFrId(frId);
+            fr.setFrClaimDate(new Date());
+            fr.setDealerId(dealerId);
+            fr.setFrClaimStatus(1);
+            fr.setFrClaimAdminId(adminId);
+            flag = financialReceiptService.update(fr);
+        }else{
             rj = ResponseJson.getFAILURE();
-            rj.setResultMsg("修改客户信息,失败原因:"+e.getMessage());
+            rj.setResultMsg("绑定客户失败");
             return  rj;
         }
         if(flag > 0){
@@ -193,4 +266,20 @@ public class FinanciaReceController {
         }
     }
 
+    /**
+     * to修改客户页面
+     * @return
+     * @author
+     * @date
+     */
+    @RequiresPermissions("dm:financialReceipt:recognize")
+    @RequestMapping("/to_order_desc")
+    public ModelAndView toOrderDesc(HttpServletRequest request,Integer frId) {
+        ModelAndView mv = new ModelAndView("dm/financialReceipt/order_desc");
+        mv.addObject("frId",frId);
+        FinancialReceipt fr = financialReceiptService.getFinancialReceiptById(frId);
+        mv.addObject("fr",fr);
+        return mv;
+    }
+
 }

+ 16 - 10
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -1,9 +1,9 @@
 package com.iamberry.rst.controllers.order;
 
-import com.iamberry.rst.core.cm.*;
-import com.iamberry.rst.core.fm.ComplaintDetectInfo;
-import com.iamberry.rst.core.fm.InventoryInfo;
-import com.iamberry.rst.core.fm.InventoryLog;
+import com.iamberry.rst.core.cm.CompanyInfo;
+import com.iamberry.rst.core.cm.SalesOrder;
+import com.iamberry.rst.core.cm.SalesOrderItem;
+import com.iamberry.rst.core.cm.StoreInfo;
 import com.iamberry.rst.core.order.*;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.core.sys.Admin;
@@ -11,24 +11,19 @@ import com.iamberry.rst.core.tools.LogisticsInfo;
 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.fm.ComplaintDetectInfoService;
 import com.iamberry.rst.faces.order.EfastOrderService;
 import com.iamberry.rst.faces.order.LogisticsInfoService;
 import com.iamberry.rst.faces.order.OrderBatchService;
 import com.iamberry.rst.faces.order.OrderWarehouseService;
 import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.faces.sms.SmsService;
-import com.iamberry.rst.util.SmsConfig;
 import com.iamberry.rst.utils.*;
-import com.iamberry.wechat.tools.NameUtils;
 import com.iamberry.wechat.tools.ResponseJson;
 import net.sf.json.JSONArray;
 import net.sf.json.JSONObject;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.lang.StringUtils;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.apache.xpath.operations.Bool;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
@@ -43,7 +38,6 @@ 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.*;
 
@@ -1907,4 +1901,16 @@ public class AdminSalesOrderController {
             /*return new ResponseJson(500, "发送短信失败,失败原因:" + result, 500);*/
 
     }
+
+    /**
+     * 到选择订单页面
+     * @param request
+     * @return
+     */
+    @RequestMapping("/to_select_order")
+    public ModelAndView toSelectOrder(HttpServletRequest request){
+        ModelAndView mv = new ModelAndView("order/salesOrder/select_order_list");
+        return mv;
+    }
+
 }

+ 10 - 25
watero-rst-web/src/main/webapp/WEB-INF/views/dm/financialReceipt/add_fr.ftl

@@ -38,12 +38,12 @@
 
         .all_down{text-decoration: underline;color: #00c;}
     </style>
-    <title>财务列表 - 财务管理 - RST</title>
+    <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> 财务列表
+    <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"
@@ -51,13 +51,13 @@
 </nav>
 <article class="page-container" style="padding: 10px;">
     <div class="pd-20 cl" style="padding-top: 0px;">
-        <form action="${path}/admin/dealer/dealere_save" method="post" class="form form-horizontal" id="form-dealer"  onkeydown="if(event.keyCode==13)return false;">
+        <form action="${path}/admin/financial_receipt/finan_rece_save" method="post" class="form form-horizontal" id="form-fr"  onkeydown="if(event.keyCode==13)return false;">
 
             <div class="row cl" id="" style="">
                 <label class="form-label col-1 col-sm-1">回款客户:</label>
                 <div class="formControls col-3 col-sm-3" >
                     <span class="select-box">
-                         <select name="dealerType" class="select chosen" id="complaint">
+                         <select name="dealerId" class="select chosen" id="dealerId">
                             <#if dmDealerList?? &&  (dmDealerList?size > 0) >
                                 <option value="0" selected>未知客户</option>
                                 <#list dmDealerList as dmDealer >
@@ -73,27 +73,28 @@
             <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">
-                    <input type="text" class="input-text" value="" placeholder="填写回款账号" id="dealerName" name="dealerName" datatype="*1-20" errormsg="回款账号格式不正确" >
+                    <input type="text" class="input-text trim_input" value="" placeholder="填写回款账号" id="frBank" name="frBank" datatype="*1-50" errormsg="回款账号必填,不能超过50个字符。" >
                 </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">
-                    <input type="text" class="input-text" value="" placeholder="填写回款金额" id="dealerName" name="dealerName" datatype="*1-20" errormsg="回款金额格式不正确" >
+                    <input type="text" class="input-text decimal_input" value="" placeholder="填写回款金额" id="frAmountBackup" name="frAmountBackup"  onkeyup="keyFunDecimal($(this),9999999,0)" myMinVal="0" myMaxVal="9999999" >
+                    <input type="hidden" value="" id="frAmount" name="frAmount"  >
                 </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">
-                    <input type="text" placeholder="请选择回款时间" value="" id="frDate"  name="frDate" class="input-text Wdate add_form" onclick="WdatePicker({skin:'whyGreen'})"  readonly="readonly">
+                    <input type="text" placeholder="请选择回款时间" value="" id="frDate"  name="frDate" myIsEmpty="1" errormsg="回款时间不能为空"  class="input-text Wdate add_form" onclick="WdatePicker({skin:'whyGreen', dateFmt: 'yyyy-MM-dd HH:mm:ss' })"  readonly="readonly">
                 </div>
             </div>
 
             <div class="row cl" id="" style="">
-                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>交易备注:</label>
+                <label class="form-label col-1 col-sm-1">交易备注:</label>
                 <div class="formControls col-3 col-sm-3">
-                    <textarea id="dealerRemarks" name="dealerRemarks" style="height: 65px;width: 100%"></textarea>
+                    <textarea id="frRemake" name="frRemake" style="height: 65px;width: 100%"></textarea>
                 </div>
             </div>
 
@@ -121,22 +122,6 @@
     //是否是修改
     var ISUPDATE = false;
 
-    var storeNode = $('.chosen').chosen({
-        no_results_text: "没有找到结果!",//搜索无结果时显示的提示
-        search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
-        allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
-        disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
-        disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
-        inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
-        placeholder_text_single: '选择店铺', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
-        width: '100%', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
-        max_shown_results: 1000, //下拉框最大显示选项数量
-        display_disabled_options: false,
-        single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
-        case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
-        group_search: false, //选项组是否可搜。此处搜索不可搜
-        include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
-    });
 
 </script>
 

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

@@ -0,0 +1,125 @@
+<!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: 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;}
+        .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: #00c;}
+    </style>
+    <title>添加财务 - 财务管理 - RST</title>
+</head>
+<body>
+
+<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;">
+
+            <input type="hidden" name="frId" value="${frId}">
+            <input type="hidden" name="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" >
+                    <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>
+                         </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>
+           </div>
+
+        </form>
+    </div>
+</article>
+<#-- 业务脚本JS -->
+<script type="text/javascript">
+    var url_path = "${path}";
+</script>
+<script type="text/javascript">
+
+    $(function(){
+        var loadIndex = 0;
+        $("#form-fr").Validform({
+            tiptype: function (msg, o, cssctl) {
+                if (o.type == 3) {//失败
+                    layer.msg(msg, {icon: 5, time: 3000});
+                    $(window).scrollTop(o.obj.offset().top - 40);
+                }
+            },
+            datatype: {//自定义验证类型
+            },
+            ignoreHidden: true,
+            tipSweep: true, //若为true,则只在表单提交时验证
+            ajaxPost: true, //异步提交
+            beforeCheck: function (curform) {  //验证通过之前执行的函数
+                var flag = false;
+            },
+            beforeSubmit: function (curform) {  //验证通过之后执行的函数
+                if(!verification()){
+                    return false;
+                }
+
+                var frAmountBackup = $("#frAmountBackup").val();
+                frAmountBackup = accMul(Number(frAmountBackup),100);
+                $("#frAmount").val(parseInt(frAmountBackup));
+
+                loadIndex = layer.load(1, {
+                    shade: [0.5,'#fff'] //0.1透明度的白色背景
+                });
+            },
+            callback: function (data) {//异步回调函数
+                if (data) {
+                    parent.claimDelaerClose();
+                    parent.layer.close(parent.layer.getFrameIndex(window.name));
+                }
+                return false;
+            }
+        });
+    });
+</script>
+
+
+</body>
+</html>

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

@@ -36,28 +36,19 @@
         <form action="${path}/admin/financial_receipt/list_page_fr" method="post">
             <button type="button" style="cursor:pointer; float: left;height: 35px;margin-right: 30px;margin-bottom: 10px;" class="my-btn-search" onclick="toAddFr();">添加收款</button>
 
-
-            <#--<select class="my-select" name="dealerState" id="dealerState" style="height: 36px;width: 132px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
-                <option value="">合作进度</option>
-                <option value="1" <#if financialReceipt.dealerState??><#if financialReceipt.questionState == 1 >selected="selected"</#if></#if>>意向合作</option>
-                <option value="2" <#if financialReceipt.dealerState??><#if financialReceipt.questionState == 2 >selected="selected"</#if></#if>>已经合作</option>
-                <option value="3" <#if financialReceipt.dealerState??><#if financialReceipt.questionState == 3 >selected="selected"</#if></#if>>停止合作</option>
+            <select class="my-select" name="frClaimStatus" id="frClaimStatus" style="height: 36px;width: 132px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
+                <option value="">认领进度</option>
+                <option value="1" <#if financialReceipt.frClaimStatus??><#if financialReceipt.frClaimStatus == 1 >selected="selected"</#if></#if>>已认领</option>
+                <option value="2" <#if financialReceipt.frClaimStatus??><#if financialReceipt.frClaimStatus == 2 >selected="selected"</#if></#if>>未认领</option>
+                <option value="3" <#if financialReceipt.frClaimStatus??><#if financialReceipt.frClaimStatus == 3 >selected="selected"</#if></#if>>已绑订单</option>
             </select>
 
-            <select class="my-select" name="dealerType" id="dealerType" style="height: 36px;width: 132px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
-                <option value="">客户类型</option>
-                <option value="1" <#if financialReceipt.dealerType??><#if financialReceipt.dealerType == 1 >selected="selected"</#if></#if>>个人</option>
-                <option value="2" <#if financialReceipt.dealerType??><#if financialReceipt.dealerType == 2 >selected="selected"</#if></#if>>企业</option>
-            </select>
-            <select class="my-select" name="dealerSelfOperated" id="dealerSelfOperated" style="height: 36px;width: 132px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
-                <option value="">是否自营</option>
-                <option value="1" <#if financialReceipt.dealerSelfOperated??><#if financialReceipt.dealerSelfOperated == 1 >selected="selected"</#if></#if>>自营</option>
-                <option value="2" <#if financialReceipt.dealerSelfOperated??><#if financialReceipt.dealerSelfOperated == 2 >selected="selected"</#if></#if>>非自营</option>
-            </select>
+            <input type="text" class="my-input trim_input"  style="width:120px;margin-right: 0px; margin-bottom: 8px;" value="${financialReceipt.frBank!}" placeholder="回款账号" id="frBank" name="frBank">
 
             <input type="text" class="my-input trim_input"  style="width:120px;margin-right: 0px; margin-bottom: 8px;" value="${financialReceipt.dealerName!}" placeholder="客户名称" id="dealerName" name="dealerName">
-            <input type="text" class="my-input trim_input"  style="width:120px;margin-right: 0px; margin-bottom: 8px;" value="${financialReceipt.dealerIndustry!}" placeholder="客户行业" id="dealerIndustry" name="dealerIndustry">
--->
+
+            <input type="text" class="my-input trim_input"  style="width:120px;margin-right: 0px; margin-bottom: 8px;" value="${financialReceipt.frClaimAdminName!}" placeholder="认领人" id="frClaimAdminName" name="frClaimAdminName">
+
             <button type="submit" class="btn" style="background: #50a2ea;border: 1px solid #50a2ea;color: #fff;height: 35px;margin-top: -8px;"><i class="Hui-iconfont">&#xe665;</i> 查询</button>
 
         </form>
@@ -89,42 +80,73 @@
                             <td>
                                <#if financialReceipt.frClaimStatus == 1>
                                    已认领
-                                <#elseif financialReceipt.frClaimStatus == 2>
+                               <#elseif financialReceipt.frClaimStatus == 2>
                                     未认领
+                               </#if>
+                            </td>
+                            <td>
+                                <#if financialReceipt.frClaimStatus == 1>
+                                    ${financialReceipt.frClaimAdminName!''}
+                                <#elseif financialReceipt.frClaimStatus == 2>
+                                    -
                                 </#if>
                             </td>
-                            <td>${financialReceipt.frClaimAdminId!''}</td>
-                            <td> ${(financialReceipt.frClaimDate?string("yyyy-MM-dd"))!''}</td>
                             <td>
+                                <#if financialReceipt.frClaimStatus == 1>
+                                    ${(financialReceipt.frClaimDate?string("yyyy-MM-dd"))!''}</br>
+                                    ${(financialReceipt.frClaimDate?string("HH:mm:ss"))!''}
+                                <#elseif financialReceipt.frClaimStatus == 2>
+                                    -
+                                </#if>
                             </td>
-                            <td></td>
-                            <td></td>
-                            <td></td>
-                            <td></td>
-                            <td></td>
                             <td>
+                                <#if financialReceipt.frClaimStatus == 1>
+                                    ${financialReceipt.dealerName!''}
+                                <#elseif financialReceipt.frClaimStatus == 2>
+                                    -
+                                </#if>
+                            </td>
+                            <td>${financialReceipt.frBank!''}</td>
+                            <td>${((financialReceipt.frAmount/100)?string("0.##"))!''}</td>
+                            <td>${financialReceipt.frRemake!''}</td>
+                            <td>
+                                ${(financialReceipt.frDate?string("yyyy-MM-dd"))!''}</br>
+                                ${(financialReceipt.frDate?string("HH:mm:ss"))!''}
+                            </td>
+                            <td>
+                                ${(financialReceipt.createDate?string("yyyy-MM-dd"))!''}</br>
+                                ${(financialReceipt.createDate?string("HH:mm:ss"))!''}
+                            </td>
+                            <td>
+
+                                <#if financialReceipt.frClaimStatus == 1 || financialReceipt.frClaimStatus == 2>
+                                        <a style="text-decoration:none" href="javascript:void(0);" title="修改信息" onclick="toUpdateFr(${financialReceipt.frId!''})">
+                                            <font color=#06c>修改</font>
+                                        </a>
+                                </#if>
 
-                             <#--   <a style="text-decoration:none" href="javascript:void(0);" title="修改" onclick="toUpdateDealer(${financialReceipt.dealerId!''})">
-                                    <font color=#06c>修改</font>
-                                </a>-->
-
-                                <#--<#if question.questionState == 1>
-                                    <a style="text-decoration:none" href="javascript:void(0);" title="禁用" onclick="forbid(${financialReceipt.dealerId!''},2)">
-                                        <font color=#06c>禁用</font>
-                                    </a>
-                                <#elseif question.questionState == 2>
-                                    <a style="text-decoration:none" href="javascript:void(0);" title="启用" onclick="forbid(${financialReceipt.dealerId!''},1)">
-                                        <font color=#06c>启用</font>
-                                    </a>
+                                <#if financialReceipt.frClaimStatus == 2>
+                                       <a style="text-decoration:none" href="javascript:void(0);" title="绑定客户" onclick="claimDelaer(${financialReceipt.frId!''},1)">
+                                            <font color=#06c>认款</font>
+                                       </a>
                                 </#if>
-                                &nbsp;
-                                <a style="text-decoration:none" href="javascript:void(0);" title="修改" onclick="toUpdateQuestion(${financialReceipt.dealerId!''})">
-                                    <font color=#06c>修改</font>
-                                </a>
-                                &nbsp;
-                                <a style="text-decoration:none" href="javascript:void(0);" title="查看" onclick="detail(${financialReceipt.dealerId!''})">
-                                    <font color=#06c>查看</font>
-                                </a>-->
+                                <#if financialReceipt.frClaimStatus == 1>
+                                       <a style="text-decoration:none" href="javascript:void(0);" title="取消绑定。" onclick="cancelClaimDelaer(${financialReceipt.frId!''},2)">
+                                            <font color=#06c>取消认款</font>
+                                       </a>
+                                </#if>
+
+                                <#if financialReceipt.frClaimStatus == 1>
+                                       <a style="text-decoration:none" href="javascript:void(0);" title="绑定订单" onclick="toOrderDesc(${financialReceipt.frId!''})">
+                                            <font color=#06c>绑定订单</font>
+                                       </a>
+                                </#if>
+
+                               <#if financialReceipt.frClaimStatus == 2>
+                                   <a style="text-decoration:none" href="javascript:void(0);" title="删除" onclick="toUpdateDealer(${financialReceipt.frId!''})">
+                                       <font color=#06c>删除</font>
+                                   </a>
+                               </#if>
                             </td>
                         </tr>
                     </#list>
@@ -141,10 +163,6 @@
 </tfoot>
 
 <script type="text/javascript">
-//    var ulc = $(".ulc_question").initUlcByHtml({
-//        urlPrefix: root_path,
-//        ulcLevel:null
-//    });
 
     /**
      * 跳转到添加收款
@@ -161,17 +179,59 @@
     }
 
     /**
-     * 查看详情
+     * 跳转到订单绑定
      */
-    function detail(questionId){
-        layer_show_norm("问题详情","${path}/admin/complaintQuestion/to_question_detail?questionId="+questionId,4);
+    function toOrderDesc(frId){
+        window.location.href= "${path}/admin/financial_receipt/to_order_desc?frId="+frId;
     }
 
     /**
+     * 跳转到认款
+     */
+    function claimDelaer(frId,type){
+        layer_show_norm("认款","${path}/admin/financial_receipt/to_claim_delaer?frId="+frId+"&type="+type,2);
+    }
+
+    /**
+     * 认款结束 - 回调
+     */
+    function claimDelaerClose(){
+        location.replace(location.href);
+    }
+
+    /**
+     * 取消认款
+     */
+    function cancelClaimDelaer(frId,type){
+            $.ajax({
+                type: "POST",
+                data: {
+                    "frId" :frId,
+                    "type" :type
+                },
+                url: "${path}/admin/financial_receipt/claim_delaer",
+                async: false,
+                success: function(data){
+                    if (data.returnCode == 200) {
+                        location.replace(location.href);
+                    }else{
+                        layer.msg("更改状态失败!", {icon: 5, time: 3000});
+                    }
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                }
+            });
+    }
+
+
+
+   /*
+
+    /!**
      * 禁用
      * @param questionId
      * @param state
-     */
+     *!/
     function forbid(questionId,state) {
         $.ajax({
             type: "POST",
@@ -191,7 +251,7 @@
             error: function(XmlHttpRequest, textStatus, errorThrown){
             }
         });
-    }
+    }*/
 
 </script>
 

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

@@ -0,0 +1,161 @@
+<!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">
+    <link rel="stylesheet" type="text/css" href="${path}/common/lib/layui/css/layui.css" />
+    <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;}
+        .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: #00c;}
+    </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" style="padding-top: 0px;">
+        <form action="${path}/admin/financial_receipt/finan_rece_save" method="post" class="form form-horizontal" id="form-fr"  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" 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.dealerName!''}
+                </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">
+                <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="">
+                <div class="formControls col-5 col-sm-5" style="padding-top: 3px;">
+                    <button type="button" class="btn btn-primary" onclick="selectOrder()">添加订单</button>
+                </div>
+            </div>
+
+            <table class="table table-border table-bordered table-bg table-hover table-sort">
+                <thead>
+                    <tr class="text-c">
+                        <th>订单状态</th>
+                        <th>待结算金额</th>
+                        <th>订单号</th>
+                        <th>交易号</th>
+                        <th>所属店铺</th>
+                        <th>订单产品</th>
+                        <th>下单日期</th>
+                        <th>下单客服</th>
+                        <th>收货人信息</th>
+                        <th>收货人地址</th>
+                    </tr>
+                </thead>
+                <tbody id="orderAll">
+                    <tr class="text-c">
+
+                    </tr>
+                </tbody>
+            </table>
+
+
+
+            <div class="row cl">
+                <div class="col-2 col-sm-2 col-offset-1">
+                    <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
+                </div>
+            </div>
+
+        </form>
+    </div>
+</article>
+<#-- 业务脚本JS -->
+<script type="text/javascript">
+    var url_path = "${path}";
+</script>
+<script type="text/javascript">
+    $('.skin-minimal input').iCheck({
+        checkboxClass: 'icheckbox-blue',
+        radioClass: 'iradio-blue',
+        increaseArea: '20%'
+    });
+
+    /**
+     *
+     */
+    function selectOrder() {
+        layer_show("搜索订单",url_path + "/admin/list_order_page/select_order","1000","500");
+    }
+</script>
+
+
+</body>
+</html>

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

@@ -0,0 +1,132 @@
+<!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: 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;}
+        .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: #00c;}
+    </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" style="padding-top: 0px;">
+        <form action="${path}/admin/financial_receipt/finan_rece_update" method="post" class="form form-horizontal" id="form-fr"  onkeydown="if(event.keyCode==13)return false;">
+
+            <input type="hidden" value="${financialReceipt.frId!''}" id="frId" name="frId" >
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">回款客户:</label>
+                <div class="formControls col-3 col-sm-3" >
+                    <span class="select-box">
+                         <select name="dealerId" class="select chosen" id="dealerId">
+                         <#if dmDealerList?? &&  (dmDealerList?size > 0) >
+                             <option value="0" <#if financialReceipt.dealerId == 0>selected</#if>>未知客户</option>
+                             <#list dmDealerList as dmDealer >
+                                 <option value="${dmDealer.dealerId}" <#if financialReceipt.dealerId??><#if financialReceipt.dealerId == dmDealer.dealerId>selected</#if></#if> >${dmDealer.dealerName}</option>
+                             </#list>
+                         </#if>
+                         </select>
+				    </span>
+                </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">
+                    <input type="text" class="input-text trim_input" value="${financialReceipt.frBank!''}" placeholder="填写回款账号" id="frBank" name="frBank" datatype="*1-50" errormsg="回款账号必填,不能超过50个字符。" >
+                </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">
+                    <input type="text" class="input-text decimal_input" value="${((financialReceipt.frAmount/100)?string("0.##"))!''}" placeholder="填写回款金额" id="frAmountBackup" name="frAmountBackup"  onkeyup="keyFunDecimal($(this),9999999,0)" myMinVal="0" myMaxVal="9999999" >
+                    <input type="hidden" value="" id="frAmount" name="frAmount"  >
+                </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">
+                    <input type="text" placeholder="请选择回款时间" value="${(financialReceipt.frDate?string("yyyy-MM-dd HH:mm:ss"))!''}" id="frDate"  name="frDate" myIsEmpty="1" errormsg="回款时间不能为空"  class="input-text Wdate add_form" onclick="WdatePicker({skin:'whyGreen', dateFmt: 'yyyy-MM-dd HH:mm:ss' })"  readonly="readonly">
+                </div>
+            </div>
+
+            <div class="row cl" id="" style="">
+                <label class="form-label col-1 col-sm-1">交易备注:</label>
+                <div class="formControls col-3 col-sm-3">
+                    <textarea id="frRemake" name="frRemake" style="height: 65px;width: 100%">${financialReceipt.frRemake!''}</textarea>
+                </div>
+            </div>
+
+            <div class="row cl">
+                <div class="col-2 col-sm-2 col-offset-1">
+                    <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
+                </div>
+            </div>
+        </form>
+    </div>
+</article>
+<#-- 业务脚本JS -->
+<script type="text/javascript">
+    var url_path = "${path}";
+</script>
+<script type="text/javascript" charset="utf-8" src="${path}/common/js/dealer/financialReceipt.js"></script>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+
+<script type="text/javascript">
+    $('.skin-minimal input').iCheck({
+        checkboxClass: 'icheckbox-blue',
+        radioClass: 'iradio-blue',
+        increaseArea: '20%'
+    });
+    //是否是修改
+    var ISUPDATE = false;
+
+</script>
+
+
+
+</body>
+</html>

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

@@ -0,0 +1,415 @@
+<!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;">
+
+                 <#--   <div class="formControls col-1 col-sm-1" style="margin-right: 30px;">
+                        <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name="" onclick="addOrder()">添加订单</button>
+                    </div>-->
+                    <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="storeId" class="select" id="storeId">
+                        </select>
+                        </span>
+                    </div>
+
+                     <#--<div class="formControls col-2 col-sm-2 select_proMethod" style="padding: 0px 10px 0px 0px; width: 110px;" code="returnCode" msg="resultMsg" data="returnMsg">-->
+                        <#--<span class="select-box">-->
+                             <#--<select class="select" id="salesOrderStatus" name="salesOrderStatus"  ulcId=""  ulcValName="procMethodName" ulcValId="procMethodId"  ulcURL="/admin/proc/method?procTypeId=" msg="" ulcList="list"  ulcIsFristSelect="1" ulcFristSelectMsg="请选择类型" >-->
+                             <#--</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="salesOrderStatus" class="select" id="salesOrderStatus">-->
+                            <#--&lt;#&ndash;1:正常 2:换货 3:退货  4:维修  5:补发&ndash;&gt;-->
+                            <#--<option value="">所有类型</option>-->
+                            <#--<option value="1">正常</option>-->
+                            <#--<option value="2">换货</option>-->
+                            <#--<option value="3">退货</option>-->
+                            <#--<option value="4">维修</option>-->
+                            <#--<option value="5">补发</option>-->
+                        <#--</select>-->
+                        <#--</span>-->
+                    <#--</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 class="formControls col-1 col-sm-1" >
+                         <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" onclick="addOrder()"> 添加订单</button>
+                     </div>
+
+                     <#--<a src="javascript:void(0)" style="color: #00e;text-decoration: underline;" onclick="addOrder()">去添加</a>-->
+                </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">销售公司</th>
+                    <th width="50">店铺名称</th>
+                    <th width="50">订单号</th>
+                    <th width="100">交易号</th>
+                    <th width="60">收货人姓名</th>
+                    <th width="80">收货人电话</th>
+                    <th width="80">订单金额</th>
+                    <th width="80">购买产品</th>
+                    <th width="80">购买日期</th>
+                    <th width="80">订单状态</th>
+                    <th width="100">收货地址</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>
+<#--<#include "/base/page_util.ftl">-->
+</tfoot>
+
+<#--时间控件-->
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+
+<script>
+
+    /*  1为选择的订单    2:为新添加的订单 */
+    var type = 1;
+
+    var promethodUlc = init_ulc($(".select_proMethod"));
+
+    $(function () {
+        /*选择店铺*/
+        $("[name='companyId']").change(function (){
+            var companyId = $(this).val();
+            setStore(companyId,$("#storeId"));       //获取店铺
+        })
+
+        /*搜索*/
+        $(document).on('click', '#searchOrder', function() {
+            searchOrder();
+        });
+
+        /*初始化  搜索订单  */
+       //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 = convertUndefinedToEmpty($("#companyId").val());
+        var salesStoreId = convertUndefinedToEmpty($("#storeId").val());
+        var salesOrderStatus = convertUndefinedToEmpty($("#salesOrderStatus").val());
+        var salesId = convertUndefinedToEmpty($("#salesId").val());
+        var salesAddressName =convertUndefinedToEmpty($("#salesAddressName").val());
+        var salesAddressTel = convertUndefinedToEmpty($("#salesAddressTel").val());
+        var salesOrderId = convertUndefinedToEmpty($("#salesOrderId").val());
+        $.ajax({
+            type: "POST",
+            data: {
+                salesCompanyId : salesCompanyId,
+                salesStoreId : salesStoreId,
+                salesOrderStatus : salesOrderStatus,
+                salesId : salesId,
+                salesOrderId : salesOrderId,
+                salesAddressName : salesAddressName,
+                salesAddressTel : salesAddressTel
+            },
+            url: "${path}/admin/customer/select_salesOrder",
+            async: true,
+            success: function(data){
+                var html = "";
+                if (data.returnCode == 200 && data.returnMsg.salesOrderList.length > 0 ) {
+                    for(var i=0;i<data.returnMsg.salesOrderList.length;i++){
+                        var salesOrder = data.returnMsg.salesOrderList[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>';
+
+                                if(salesOrderItem[j].itemNum - salesOrderItem[j].itemReturnNum <= 0){
+                                    disHtml = 'disabled="disabled"';
+                                }else{
+                                    disHtml =  "";
+                                }
+                        }
+                        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;
+                        }
+
+                        <#--1:正常 2:换货 3:退货  4:维修  5:补发-->
+
+
+                        if(salesOrder.salesOrderId == null || salesOrder.salesOrderId == "" || typeof (salesOrder.salesOrderId) == 'undefined' || salesOrder.salesReturnStatus == 2){
+                            disHtml = 'disabled="disabled"';
+                        }
+                        html += '<tr class="text-c">' +
+                                ' <td><input type="checkbox" class="sales_order_id" title="订单状态为已退货并且可退货数量为0时不可选择" id="" value="'+ salesOrder.salesId +'" '+ disHtml +'></td>' +
+                                ' <td>'+ convertUndefinedToEmpty(salesOrder.companyName) +'</td>' +
+                                ' <td>'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
+                                ' <td>'+ convertUndefinedToEmpty(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>' +
+                                //' <td><a style="" class="select-order" href="javascript:void(0);" title="选择订单" onclick="selectOrderInfo('+ salesOrder.salesId +')" >选择订单</a></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(newOrderId) {
+        var orderId = "";
+        if(type == 1){
+            $(".sales_order_id").each(function(){
+                if($(this).is(':checked')){
+                    orderId += $(this).val() + "_";
+                }
+            })
+        }else{
+            if(newOrderId != null){
+                orderId = newOrderId  + "_";;
+            }
+        }
+        parent.setSelectOrder(orderId);
+        parent.layer.close(parent.layer.getFrameIndex(window.name));
+    }
+
+    function toSearch(){
+        $(".order-add").hide();
+        $(".order-list").show();
+    }
+</script>
+
+
+<script>
+    $(function (){
+
+        $("#search-product-name-btn").click(function() {
+           var name = $("#search-product-name-input").val();
+           var trs = $("#addProduct").children("tr");
+           if (trs == null || trs.length <= 0) {
+               return;
+           }
+           for (var i = 0; i < trs.length;i ++) {
+               var temp = $($(trs[i]).children("td")[0]).find("span").text();
+               if (temp.indexOf(name) == -1) {
+                   $(trs[i]).hide();
+               } else {
+                   $(trs[i]).show();
+               }
+           }
+        });
+
+        $("#form-order-add").Validform({
+            tiptype: function (msg, o, cssctl) {
+                if (o.type == 3) {//失败
+                    layer.msg(msg, {icon: 5, time: 3000});
+                    $(window).scrollTop(o.obj.offset().top - 40);
+                }
+            },
+            datatype: {//自定义验证类型
+            },
+            ignoreHidden: true,
+            tipSweep: true, //若为true,则只在表单提交时验证
+            ajaxPost: true, //异步提交
+            beforeCheck: function (curform) {  //验证通过之前执行的函数
+                var salesCompanyId = $("#salesCompanyId").val();
+                var salesStoreId = $("#salesStoreId").val();
+                if(salesCompanyId == null || salesCompanyId == "" || typeof(salesCompanyId) == "undefined" ||
+                        salesStoreId == null || salesStoreId == "" || typeof(salesStoreId) == "undefined"){
+                    layer.msg("请选择销售公司与店铺", {icon: 5, time: 3000});
+                    return  false;
+                }
+            },
+            beforeSubmit: function (curform) {  //验证通过之后执行的函数
+                var pro = $("#province").find("option:selected").text();
+                var city = $("#city").find("option:selected").text();
+                var dis = $("#district").find("option:selected").text();
+                var addres = $("#sendAddress").val();
+                if(addres == null || addres == ""){
+                    layer.msg("未填写详细地址", {icon: 5, time: 3000});
+                    return  false;
+                }
+                $("#salesAddressInfo").val(pro + "-" + city + "-" + dis + "-" + addres);
+
+                var itemList = new Array();
+                $("#addProduct").find(".input-color-number").each(function(){
+                    var number = $(this).val();
+                    if(number != null && number != ""){
+                        var salesOrderItem = new Object();
+                        salesOrderItem.itemProductId = $(this).parent().find(".input-produce-id").val();
+                        salesOrderItem.itemColorId = $(this).parent().find(".input-color-id").val();
+                        salesOrderItem.itemNum = number;
+                        salesOrderItem.itemIsSource = 1;    /*标识产品*/
+                        itemList.push(salesOrderItem);
+                    }
+                })
+//                $("#addProduct").find(".input-fittings-number").each(function(){
+//                    var number = $(this).val();
+//                    if(number != null && number != ""){
+//                        var salesOrderItem = new Object();
+//                        salesOrderItem.itemProductId = $(this).parent().find(".input-produce-id").val();
+//                        salesOrderItem.itemColorId = $(this).parent().find(".input-fittings-id").val();
+//                        salesOrderItem.itemNum = number;
+//                        salesOrderItem.itemIsSource = 2;    /*标识配件*/
+//                        itemList.push(salesOrderItem);
+//                    }
+//                })
+                $("#itemJson").val(JSON.stringify(itemList));
+            },
+            callback: function (data) {//异步回调函数
+                if (data) {
+                    var index = layer.alert(data.resultMsg, function () {
+                        if (data.resultCode == 200) {
+                            type = 2;
+                            selectOrderInfo(data.returnMsg.orderId);
+                        } else {
+                            layer.close(index);
+                        }
+                        return ;
+                    });
+                }
+            }
+        })
+    });
+
+
+
+</script>
+</body>
+</html>

+ 38 - 13
watero-rst-web/src/main/webapp/common/js/common/common.js

@@ -115,7 +115,7 @@ function keyFun(node,maxNumber,minNumber){
         return false;
     }
     var temp_amount=c.val().replace(/[^\d]/g,'');
-    var number  = Number(temp_amount)
+    var number  = Number(temp_amount);
     if(maxNumber!= null && maxNumber!= "" && number > maxNumber){
         number = maxNumber;
     }
@@ -136,21 +136,53 @@ function keyFun(node,maxNumber,minNumber){
 function keyFunDecimal(node,maxNumber,minNumber){
     var c=$(node);
     if(c.val() == ""){
-        $(node).val("");
         return false;
     }
-    var temp_amount=c.val().replace(/[^\d.]/g,'');;
-    var number  = Number(temp_amount)
+    var val = dealWithDecimal(c.val(),maxNumber,minNumber);
+    $(node).val(val);
+    return false;
+}
+
+/**
+ * 处理小数数据
+ * @param val
+ * @param maxNumber
+ * @param minNumber
+ * @returns {*}
+ */
+function dealWithDecimal(val,maxNumber,minNumber){
+    if(val == "."){
+        return "0.";
+    }
+    var commaNum = -1;
+    for(var i=0;i<val.length;i++){
+        if(val.charAt(i) == "." && commaNum == -1){
+            commaNum = i;
+        }
+    }
+    if(commaNum > -1){
+        var hasComma = val.substring(commaNum+1,val.length);
+        hasComma = hasComma.replace(/[^\d]/g,'');
+        val = val.substring(0,commaNum+1) + hasComma;
+    }
+
+    var temp_amount=val.replace(/[^\d.]/g,'');
+    var number  = Number(temp_amount);
     if(maxNumber!= null && maxNumber!= "" && number > maxNumber){
         number = maxNumber;
     }
     if(minNumber!= null && minNumber!= "" && number < minNumber){
         number = minNumber;
     }
-    $(node).val(number);
+    if(val.substring(0,1) == "."){
+        return "0"+val;
+    }
+    if(val.substring(val.length-1,val.length) == "."){
+        return number+".";
+    }
+    return number;
 }
 
-
 /**
  * 获取当前节点,超过最大字节删除
  * @param node
@@ -169,13 +201,6 @@ function keyFunString(node,maxLength){
     $(node).val(temp_amount);
 }
 
-
-// var c=$(node);
-// if(/[^\d]/.test(c.val())){//替换非数字字符
-//     var temp_amount=c.val().replace(/[^\d]/g,'');
-//     $(node).val(temp_amount);
-// }
-
 /**
  * 用于展示错误信息,并让该节点得到焦点
  */

+ 28 - 2
watero-rst-web/src/main/webapp/common/js/common/commonInit.js

@@ -3,5 +3,31 @@ $(function(){
     $(".trim_input").change(function(){
         var value = $.trim($(this).val());
         $(this).val(value);
-    })
-})
+    });
+
+    //小数
+    $('.decimal_input').bind('paste',function(e){
+        var pastedText = undefined;
+        if (window.clipboardData && window.clipboardData.getData) { // IE
+            pastedText = window.clipboardData.getData('Text');
+        } else {
+            pastedText = e.originalEvent.clipboardData.getData('Text');//e.clipboardData.getData('text/plain');
+        }
+        var maxNumber = $(this).attr("myMaxVal");
+        var minNumber = $(this).attr("myMinVal");
+
+        var val = dealWithDecimal(pastedText,maxNumber,minNumber);
+
+        if (window.clipboardData && window.clipboardData.getData) { // IE
+            window.clipboardData.setData('Text', val);
+        } else {
+            e.originalEvent.clipboardData.setData('Text', val);
+        }
+        $(this).val(val);
+        return false;//否则设不生效
+    });
+});
+
+
+
+

+ 64 - 0
watero-rst-web/src/main/webapp/common/js/dealer/financialReceipt.js

@@ -0,0 +1,64 @@
+var storeNode = $('.chosen').chosen({
+    no_results_text: "没有找到结果!",//搜索无结果时显示的提示
+    search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置‘hfalse,则要求从选项开头开始匹配
+    allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
+    disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
+    disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
+    inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
+    placeholder_text_single: '选择店铺', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
+    width: '100%', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+    max_shown_results: 1000, //下拉框最大显示选项数量
+    display_disabled_options: false,
+    single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
+    case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
+    group_search: false, //选项组是否可搜。此处搜索不可搜
+    include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
+});
+
+$(function(){
+    var loadIndex = 0;
+    $("#form-fr").Validform({
+        tiptype: function (msg, o, cssctl) {
+            if (o.type == 3) {//失败
+                layer.msg(msg, {icon: 5, time: 3000});
+                $(window).scrollTop(o.obj.offset().top - 40);
+            }
+        },
+        datatype: {//自定义验证类型
+        },
+        ignoreHidden: true,
+        tipSweep: true, //若为true,则只在表单提交时验证
+        ajaxPost: true, //异步提交
+        beforeCheck: function (curform) {  //验证通过之前执行的函数
+            var flag = false;
+        },
+        beforeSubmit: function (curform) {  //验证通过之后执行的函数
+            if(!verification()){
+                return false;
+            }
+
+            var frAmountBackup = $("#frAmountBackup").val();
+            frAmountBackup = accMul(Number(frAmountBackup),100);
+            $("#frAmount").val(parseInt(frAmountBackup));
+
+            loadIndex = layer.load(1, {
+                shade: [0.5,'#fff'] //0.1透明度的白色背景
+            });
+        },
+        callback: function (data) {//异步回调函数
+            if (data) {
+                var index = layer.alert(data.resultMsg, function (index) {
+                    if (data.returnCode == 200) {
+                        location.href = url_path + "/admin/financial_receipt/list_page_fr";
+                    }else {
+                        layer.close(index);
+                    }
+                });
+                if(loadIndex != 0 ){
+                    layer.close(loadIndex);
+                }
+            }
+            return false;
+        }
+    });
+});