فهرست منبع

添加客户基本信息

dujinyan 7 سال پیش
والد
کامیت
b2c3d3c0e9
1فایلهای تغییر یافته به همراه26 افزوده شده و 9 حذف شده
  1. 26 9
      watero-rst-web/src/main/webapp/WEB-INF/views/customer/save_customer_info.ftl

+ 26 - 9
watero-rst-web/src/main/webapp/WEB-INF/views/customer/save_customer_info.ftl

@@ -205,7 +205,7 @@
                     <select name="supplyPrice" id="supplyPrice" class="select">
                     </select>
                 </span>
-                    <input type="text" class="input-text"  style="width:90px;margin-right: 0px;margin-bottom: 10px;"  placeholder="填写供货价格" id="writeSupplyPrice" name="writeSupplyPrice">
+                    <input type="text" class="input-text"  style="width:120px;margin-right: 0px;margin-bottom: 10px;"  placeholder="手动填写供货价格" id="writeSupplyPrice" name="writeSupplyPrice">
             </div>
             <label class="form-label col-2 col-sm-2" style="width:120px;"><span class="c-red">*</span>账期:</label>
             <div class="formControls col-2 col-sm-2" style="width:120px; padding:0px 0px;margin-right: 15px;">
@@ -307,11 +307,11 @@
                     </select>
                 </span>
             </div>
-                <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>开户支行:</label>
+                <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red normalTicketType">*</span>开户支行:</label>
                 <div class="formControls col-2 col-sm-2 skin-minimal">
                     <input type="text" class="input-text trim_input" placeholder="开户支行名称" id="ticketAccountOpeningBranch" name="ticketAccountOpeningBranch" value="">
                 </div>
-                <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>开票账户:</label>
+                <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red normalTicketType">*</span>开票账户:</label>
                 <div class="formControls col-2 col-sm-2 skin-minimal">
                     <input type="text" class="input-text trim_input" placeholder="开票账户" id="ticketOpeningAccount" name="ticketOpeningAccount" value="">
                 </div>
@@ -325,13 +325,13 @@
             <div class="formControls col-2 col-sm-2 skin-minimal">
                 <input type="text" class="input-text trim_input" placeholder="纳税人识别号" id="taxpayerIdentificationNum" name="taxpayerIdentificationNum" value="">
             </div>
-            <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>开票电话:</label>
+            <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red normalTicketType">*</span>开票电话:</label>
             <div class="formControls col-2 col-sm-2 skin-minimal">
                 <input type="text" class="input-text trim_input" placeholder="开票电话" id="ticketOpeningPhone" name="ticketOpeningPhone" value="">
             </div>
         </div>
         <div class="row cl" style="margin-bottom: 10px;" id="isShowAddress">
-            <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>企业地址:</label>
+            <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red normalTicketType">*</span>企业地址:</label>
             <div class="formControls col-2 col-sm-2 skin-minimal" style="width: 1105px;">
                 <input type="text" class="input-text trim_input" placeholder="企业地址" id="enterpriseAddress" name="enterpriseAddress" value="">
             </div>
@@ -416,6 +416,10 @@
             var isOpenTicket = $("input[name='isOpenTicket']:checked").val();
             isShowOpenTicket(isOpenTicket);
         });
+        /*监听发票类型*/
+        $("[name='ticketType']").change(function (){
+            isShowRedStar($(this).val());
+        })
     })
 
     /*业务逻辑js控制 start*/
@@ -438,6 +442,15 @@
         }
     }
 
+    function isShowRedStar(ticketType) {
+        if(ticketType == "1"){
+            $(".normalTicketType").show();
+
+        }else{
+            $(".normalTicketType").hide();
+
+        }
+    }
     /*初始化省份*/
     function initProvince() {
         //默认查询参数为空
@@ -580,6 +593,7 @@
             async: true,
             success: function(data){
                 var html = '<option value="">请选择销售产品</option>';
+                //var html = '';
                 var id;
                 if (data.returnCode == 200) {
                     for(var i=0;i<data.returnMsg.promotingProductsList.length;i++){
@@ -614,17 +628,20 @@
                 url: "${path}/admin/customerBasic/query_supplyPriceList",
                 async: true,
                 success: function(data){
-                    var html = '<option value="">手动输入产品价格</option>';
+                    //var html = '<option value="">手动输入产品价格</option>';
+                    var html = '';
+                    var chose = "手动输入产品价格"
                     if (data.returnCode == 200) {
                         for(var i=0;i<data.returnMsg.supplyPriceList.length;i++){
                             var supplyPriceInfo = data.returnMsg.supplyPriceList[i];
                             html += '<option value="'+ supplyPriceInfo.colorPrice/100 +'">'+ supplyPriceInfo.colorPrice/100 +'</option>';
                         }
+                        html += '<option value="00">'+ chose +'</option>';
                     }else{
                         html = '';
                     }
                     $("[name='supplyPrice']").html(html);
-                    $("#writeSupplyPrice").show();
+                    //$("#writeSupplyPrice").show();
                 },
                 error: function(XmlHttpRequest, textStatus, errorThrown){
                 }
@@ -634,7 +651,7 @@
 
     /*监听产品价格选项*/
     function changeSupplyPrice(supplyPrice){
-        if(supplyPrice == ""){
+        if(supplyPrice == "00"){
             $("#writeSupplyPrice").show();
         }else{
             $("#writeSupplyPrice").hide();
@@ -919,7 +936,7 @@
             return;
         }else{
             var reg =  /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
-            if(!reg.test(contactPhone)){
+            if(!reg.test(billingInfo.receivablesPhone)){
                 layer.msg("请填写正确的手机号码!", {icon: 5, time: 3000});
                 return;
             }