浏览代码

修改客户信息

liujiankang 7 年之前
父节点
当前提交
0b3ed42d79

+ 14 - 5
watero-rst-core/src/main/java/com.iamberry.rst.core/customer/BillingInfo.java

@@ -15,7 +15,8 @@ public class BillingInfo implements Serializable {
     private String accountNum;//账号
     private String receivablesName;//收款人姓名
     private String receivablesPhone;//收款人电话
-    private Date create_date;//创建时间
+    private Date createDate;//创建时间
+    private Integer accountType;//账户类型 1:公司 2:个人
 
     public Integer getBillingId() {
         return billingId;
@@ -73,11 +74,19 @@ public class BillingInfo implements Serializable {
         this.receivablesPhone = receivablesPhone;
     }
 
-    public Date getCreate_date() {
-        return create_date;
+    public Date getCreateDate() {
+        return createDate;
     }
 
-    public void setCreate_date(Date create_date) {
-        this.create_date = create_date;
+    public void setCreateDate(Date createDate) {
+        this.createDate = createDate;
+    }
+
+    public Integer getAccountType() {
+        return accountType;
+    }
+
+    public void setAccountType(Integer accountType) {
+        this.accountType = accountType;
     }
 }

+ 10 - 5
watero-rst-service/src/main/java/com/iamberry/rst/service/customer/mapper/CustomerBasicMapper.xml

@@ -114,7 +114,8 @@
         account_num as accountNum,
         receivables_name as receivablesName,
         receivables_phone as receivablesPhone,
-        create_date as createDate
+        create_date as createDate,
+        account_type as accountType
         from tb_rst_billing_info
         <where>
             <if test="customerId != null and customerId !='' ">
@@ -370,11 +371,11 @@
         INSERT INTO
         tb_rst_billing_info
         (
-        customer_id, account_opening_branch, account_name, account_num, receivables_name,receivables_phone,create_date
+        customer_id, account_opening_branch, account_name, account_num, receivables_name,receivables_phone,create_date,account_type
         )
         VALUES
         (
-        #{customerId},#{accountOpeningBranch},#{accountName},#{accountNum},#{receivablesName},#{receivablesPhone},NOW()
+        #{customerId},#{accountOpeningBranch},#{accountName},#{accountNum},#{receivablesName},#{receivablesPhone},NOW(),#{accountType}
         )
     </insert>
 
@@ -450,7 +451,8 @@
         t.account_num,
         t.receivables_name,
         t.receivables_phone,
-        t.create_date
+        t.create_date,
+        t.account_type
         FROM
         tb_rst_billing_info t
         WHERE
@@ -607,7 +609,10 @@
                 receivables_name = #{receivablesName},
             </if>
             <if test="receivablesPhone != null and receivablesPhone !='' " >
-                receivables_phone = #{receivablesPhone}
+                receivables_phone = #{receivablesPhone},
+            </if>
+            <if test="accountType != null and accountType !='' " >
+                account_type = #{accountType}
             </if>
         </set>
         where customer_id = #{customerId}

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

@@ -187,7 +187,7 @@
                                         <#list list.listChannelSaleInfo as list>
                                         <tr>
                                             <td>${list.promotingProducts}</td>
-                                            <td>${list.supplyPrice}</td>
+                                            <td>${list.supplyPrice/100}</td>
                                             <td>
                                             <#if list.accountPeriod == 1>先款</#if>
                                             <#if list.accountPeriod == 2>月结 </#if>

+ 49 - 16
watero-rst-web/src/main/webapp/WEB-INF/views/customer/update_customer_info.ftl

@@ -65,7 +65,7 @@
         <input type="hidden" id="billingId" name="billingId" value="<#if billingInfo??>${billingInfo.billingId!''}</#if>">
         <input type="hidden" id="ticketOpeningId" name="ticketOpeningId" value="<#if billingInfo??>${ticketOpeningInfo.ticketOpeningId!''}</#if>">
         <#--客户基本信息 start-->
-        <div class="row cl">
+        <div class="row cl" style="margin-bottom: 10px;">
             <label class="form-label col-2">
                 <div class="tit-2">客户基本信息</div>
             </label>
@@ -128,8 +128,8 @@
         </div>
         <#--客户基本信息 end-->
         <#--对接联系人信息-->
-        <div class="row cl">
-            <label class="form-label col-3">
+        <div class="row cl" style="margin-bottom: 10px;">
+            <label class="form-label col-9">
                 <div class="tit-2">对接联系人信息<span style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:14px;">(请确保真实性,公司将不定期抽验回访)</span></div>
             </label>
             <div class="formControls col-9">
@@ -175,7 +175,7 @@
             </div>
         </div>
         <#--客户销售渠道信息备案-->
-        <div class="row cl">
+        <div class="row cl" style="margin-bottom: 10px;">
             <label class="form-label col-3">
                 <div class="tit-2">客户销售渠道信息备案</div>
             </label>
@@ -283,22 +283,43 @@
             </div>
         </div>
         <#--付款/退款信息-->
-        <div class="row cl">
+        <div class="row cl" style="margin-bottom: 10px;">
             <label class="form-label col-9">
                 <div class="tit-2">付款/退款信息<span style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:14px;">(请真实有效,用于财务收款确认或退款业务)</span></div>
             </label>
             <div class="formControls col-9">
             </div>
         </div>
+        <div class="row cl skin-minimal" style="margin-bottom: 10px;">
+
+                <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>账户类型:</label>
+                <div class="radio-box">
+                    <input type="radio" id="accountType-1" name="accountType" value="1" checked>
+                    <label for="accountType-1">公司</label>
+                </div>
+                <div class="radio-box">
+                    <input type="radio" id="accountType-2" name="accountType" value="2">
+                    <label for="accountType-2">个人</label>
+                </div>
+
+        </div>
         <#if billingInfo??>
         <div class="row cl" style="margin-bottom: 10px;">
             <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>开户支行:</label>
             <div class="formControls col-2 col-sm-2">
                 <input type="text" class="input-text trim_input" placeholder="开户支行" id="accountOpeningBranch" name="accountOpeningBranch" value="${billingInfo.accountOpeningBranch!''}">
             </div>
-            <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>账户名称:</label>
-            <div class="formControls col-2 col-sm-2 skin-minimal">
-                <input type="text" class="input-text trim_input" placeholder="账户名称" id="accountName" name="accountName" value="${billingInfo.accountName!''}">
+            <div id="accountNameid">
+                <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>企业名称:</label>
+                <div class="formControls col-2 col-sm-2 skin-minimal">
+                    <input type="text" class="input-text trim_input" id="accountName" name="accountName" value="${billingInfo.accountName!''}">
+                </div>
+            </div>
+            <div id="receivablesNameId" style="display:none;">
+                <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>收款人姓名:</label>
+                <div class="formControls col-2 col-sm-2 skin-minimal">
+                    <input type="text" class="input-text trim_input" placeholder="收款人姓名" id="receivablesName" name="receivablesName" value="${billingInfo.receivablesName!''}">
+                </div>
             </div>
             <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>账号:</label>
             <div class="formControls col-2 col-sm-2 skin-minimal">
@@ -306,10 +327,6 @@
             </div>
         </div>
         <div class="row cl" style="margin-bottom: 10px;">
-            <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>收款人姓名:</label>
-            <div class="formControls col-2 col-sm-2 skin-minimal">
-                <input type="text" class="input-text trim_input" placeholder="收款人姓名" id="receivablesName" name="receivablesName" value="${billingInfo.receivablesName!''}">
-            </div>
             <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>收款人手机:</label>
             <div class="formControls col-2 col-sm-2 skin-minimal">
                 <input type="text" class="input-text trim_input" placeholder="收款人手机" id="receivablesPhone" name="receivablesPhone" value="${billingInfo.receivablesPhone!''}">
@@ -321,13 +338,13 @@
                 <div class="formControls col-2 col-sm-2">
                     <input type="text" class="input-text trim_input" placeholder="开户支行" id="accountOpeningBranch" name="accountOpeningBranch" value="">
                 </div>
-                <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>账户名称:</label>
+                <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span><span id="accountNameId">企业名称:</span></label>
                 <div class="formControls col-2 col-sm-2 skin-minimal">
-                    <input type="text" class="input-text trim_input" placeholder="账户名称" id="accountName" name="accountName" value="">
+                    <input type="text" class="input-text trim_input" id="accountName" name="accountName" value="">
                 </div>
                 <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>账号:</label>
                 <div class="formControls col-2 col-sm-2 skin-minimal">
-                    <input type="text" class="input-text trim_input" placeholder="填写账号" id="accountNum" name="accountNum" value="">
+                    <input type="text" class="input-text trim_input" placeholder="填写账号" id="accountNum" name="accountNum" value="" onblur="">
                 </div>
             </div>
             <div class="row cl" style="margin-bottom: 10px;">
@@ -466,12 +483,13 @@
         <input type="hidden" id="cityCode" value="${customerBasicInfo.customerCityCode!''}">
     </form>
 </div>
-
+<script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
 <#--业务js-->
 <#--<script type="text/javascript" src="${path}/common/js/customerSaveAdmin/save_customer_info.js"></script>-->
 <script>
     /*初始化页面参数*/
     $(function () {
+
         /* 初始化单选框样式 */
         //initCheck();
         $('.skin-minimal input').iCheck({
@@ -510,6 +528,21 @@
             changeSupplyPrice($(this).val());
         })
     })
+    /*监听控制退款名称显示事件*/
+    $("input[name='accountType']").change(function (){
+        var accountType = parseInt($(this).val());
+        if(accountType == 1){
+            $("#accountNameid").show();
+            $("#receivablesNameId").hide();
+        }else{
+            $("#accountNameid").hide();
+            $("#receivablesNameId").show();
+        }
+    });
+
+    function accountFill(){
+
+    }
 
     /*业务逻辑js控制 start*/
     $(document).on('click', '.dalog-ask .answer', function() {