Commit 1e0b7b4dd2f421837e503ed422d99568024e9969

Authored by Andy
1 parent 10646c94

add license码

add 会员卡续费加一天
add 黄石facicon更新 app下载icon更新
admin/favicon.ico
No preview for this file type
admin/login.html
... ... @@ -17,11 +17,13 @@
17 17  
18 18 <!-- END PAGE LEVEL PLUGINS -->
19 19 <!-- BEGIN THEME GLOBAL STYLES -->
20   - <!--<link href="../assets/global/css/components.min.css" rel="stylesheet" id="style_components" type="text/css" />-->
  20 + <link href="../assets/global/css/components.min.css" rel="stylesheet" id="style_components" type="text/css" />
21 21 <link href="../assets/pages/css/common.css?a=1" rel="stylesheet" type="text/css" />
22 22 <link href="../assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
23 23 <!-- END THEME GLOBAL STYLES -->
24 24 <!-- BEGIN PAGE LEVEL STYLES -->
  25 + <link rel="stylesheet" type="text/css" href="../assets/pages/css/commonsetcss/commonsetcss.css?a=3"/>
  26 + <link rel="stylesheet" type="text/css" href="../assets/pages/css/theme/blue.css?a=3"/>
25 27 <link href="../assets/pages/css/login.css?a=1" rel="stylesheet" type="text/css" />
26 28 <!-- END PAGE LEVEL STYLES -->
27 29 <!-- BEGIN THEME LAYOUT STYLES -->
... ... @@ -85,6 +87,32 @@
85 87 <!--&lt;!&ndash;版权所有&ndash;&gt;-->
86 88 <!--<div class="zteitslogin_foot">版权所有: 中兴智能交通股份有限公司 © 2008-2016.ZTE ITS LIMITED. All Rights Reserved </div>-->
87 89 <!--</div>-->
  90 +<div class="modal fade in" id="login_licensemodel" style="display: none;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  91 + <div class="ITD-modal-dialog blue-modal">
  92 + <div class="modal-content ITD-common-color070">
  93 + <div class="modal-header ITD-model-header">
  94 + <button type="button" class="close ITD-model-close" data-dismiss="modal" aria-hidden="true">×</button>
  95 + <span class="ITD-common-fontsize16 colorbig ITD-ztree-headername">License授权码</span>
  96 + <input type="text" id="login-licenseID" hidden="hidden">
  97 + </div>
  98 + <div class="modal-body" style="padding:15px;padding-top: 0">
  99 + <!--错误提示 sta-->
  100 + <div id="login_error" class="ITD-model-errormsg display-none"></div>
  101 + <!--错误提示 end-->
  102 + <div class="">
  103 + <textarea name="" id="login-licenseMsg" cols="46" rows="5" class="licenseMsg ITD-input-bordercolor" placeholder="请输入License授权码"></textarea>
  104 + </div>
  105 + <!--底部 sta-->
  106 + <div class="modal-footer ITD-model-footer">
  107 + <button type="button" class="btn ITD-model-btn ITD-bgcolor-c2cad8" data-dismiss="modal" style="line-height: 0">取消</button>
  108 + <button type="button" class="btn ITD-model-btn ITD-bgcolor-green textTrue" style="line-height: 0" id="loginl-submit">确定</button>
  109 + </div>
  110 + <!--底部 end-->
  111 + </div>
  112 +
  113 + </div>
  114 + </div>
  115 +</div>
88 116 <!--[if lt IE 9]>
89 117 <script src="../assets/global/plugins/respond.min.js"></script>
90 118 <script src="../assets/global/plugins/excanvas.min.js"></script>
... ...
assets/layouts/layout/img/quickMarkhs.png

8.44 KB | W: | H:

21 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
assets/pages/scripts/home/index.js
... ... @@ -681,7 +681,6 @@ var specialAccount = [&#39;10122&#39;,&#39;10014&#39;,&#39;10050&#39;];
681 681  
682 682 var data = [];
683 683  
684   - debugger
685 684 //赤峰账号特殊处理
686 685 if((specialAccount.indexOf(fn.getUserId()) >= 0) && fn.getOrgId() ==10003){
687 686 data = fn.getParkLot(3);
... ... @@ -766,6 +765,62 @@ var specialAccount = [&#39;10122&#39;,&#39;10014&#39;,&#39;10050&#39;];
766 765  
767 766 })();
768 767  
  768 +//license码 右下角弹窗
  769 +function licensepopInit(title,content) {
  770 + //取当前浏览器窗口大小
  771 + var windowWidth=$(document).width();
  772 + var windowHeight=$(document).height();
  773 + //弹窗的大小
  774 + var weight=320;
  775 + var height=240;
  776 + $("body").append(
  777 + "<div id='pop_div'style='display:none;position:absolute;background-color:#fff;z-index:99;width:"+weight+"px;height:"+height+"px;bottom: 10px;right:10px'>"+
  778 + "<div style='line-height:32px;background:#1E95CD;color:#fff;font-size:14px;padding:0 0 0 10px;'>" +
  779 + "<div style='float:left;'><b>"+title+"</b></div><div style='float:right;cursor:pointer;'>" +
  780 + // "<b onclick='pop_close()' style='width: 15px;display: inline-block;'>×</b>" +
  781 + "</div>" +
  782 + "<div style='clear:both'></div>"+
  783 + "</div>" +
  784 + "<div id='content' style='padding-top: 60px;color:red '>您的License授权码将于" +
  785 + content+
  786 + "过期,请尽快更新</div>"+
  787 + "</div>"
  788 + );
  789 +}
  790 +//关闭提示
  791 +function pop_close(){
  792 + $('#pop_div').fadeOut(400);
  793 +};
  794 +//倒计时函数
  795 +var licennseTimer = window.setTimeout("pop_close()",6000);
  796 +
  797 +//license 函数
  798 +function updateSysLicense() {
  799 + var req = {
  800 + orgId: fn.getOrgId(),
  801 + };
  802 + var licenseAjax = {
  803 + method: "post",
  804 + url: dataUrl.util.querySysLicense(),
  805 + data: JSON.stringify(req),
  806 + contentType: 'application/json; charset=utf-8',
  807 + dataType: 'json',
  808 + success: function (res) {
  809 + if (res.code == '8888') {
  810 + var ext=res.data.ext
  811 + licensepopInit("提示",ext);
  812 + $('#pop_div').fadeIn(400);
  813 + } else {
  814 + console.log(res);
  815 + }
  816 + }
  817 + };
  818 + sysAjax(licenseAjax);
  819 +};
  820 +
  821 +updateSysLicense();
  822 +
  823 +
769 824  
770 825 //获取获取和时间状态
771 826 function userName() {
... ...
assets/pages/scripts/login.min.js
... ... @@ -84,7 +84,7 @@ slide();
84 84  
85 85  
86 86 /**
87   - * 输入框内容检测插件
  87 + * 输入框内容检测插件 $('#login_licensemodel').modal('show');
88 88 */
89 89 var $imageCodeValue = $('#login_imgCode_value');
90 90 var $imageCode = $('#login_imgCode');
... ... @@ -188,8 +188,8 @@ $(&#39;#password&#39;).on(&quot;blur&quot;, function() { //验证邮箱地址
188 188 $('#login-btn').on('click',function () {
189 189 var obj1 = $('#userName');
190 190 var obj2 = $('#password');
191   - username(obj1);
192   - password(obj2);
  191 + username(obj1);
  192 + password(obj2);
193 193 //verification($('#login_imgCode_value'));
194 194 if(flagAjax){
195 195 var verificationText = $('#slide_xbox').text();
... ... @@ -227,7 +227,7 @@ $(&#39;#login-btn&#39;).on(&#39;click&#39;,function () {
227 227  
228 228 }
229 229  
230   - // window.location.href='index.html';
  230 + // window.location.href='index.html';
231 231 });
232 232 //回车事件
233 233 $('#login_imgCode_value').keyup(function(event){
... ... @@ -237,12 +237,12 @@ $(&#39;#login_imgCode_value&#39;).keyup(function(event){
237 237 }
238 238 });
239 239 $('#login_imgCode_value').on('input',function () {
240   - var val = $('#login_imgCode_value').val();
241   - if(val){
242   - $('.verification-logo').addClass('glyphicon glyphicon-remove');
243   - }else{
244   - $('.verification-logo').removeClass('glyphicon glyphicon-remove');
245   - }
  240 + var val = $('#login_imgCode_value').val();
  241 + if(val){
  242 + $('.verification-logo').addClass('glyphicon glyphicon-remove');
  243 + }else{
  244 + $('.verification-logo').removeClass('glyphicon glyphicon-remove');
  245 + }
246 246  
247 247 });
248 248 $('.verification-logo').on('click',function () {
... ... @@ -272,6 +272,7 @@ function imgCodeSuccess(res) {
272 272 }
273 273  
274 274 }
  275 +var loginorgID = '';//loginorgID
275 276 //登录成功的函数
276 277 function loginSuccess(res) {
277 278 if (res.code === '8888') {
... ... @@ -308,18 +309,74 @@ function loginSuccess(res) {
308 309 // $('.verification-logo').addClass('glyphicon glyphicon-remove');
309 310 $('#login_error_ifo').text("验证码错误");
310 311 //return false;
311   - // $imageCodeValue.focus();
312   - // getImgCode();
  312 + // $imageCodeValue.focus();
  313 + // getImgCode();
313 314 } else if(res.code == "2010"){
314   - $('#login_error_ifo').text("用户没有关联停车场");
  315 + $('#login_error_ifo').text("用户没有关联停车场");
315 316 // getImgCode();
  317 + }else if(res.code == "2012"){
  318 + // $('#login_error_ifo').text("License不存在");
  319 + loginorgID=res.data.orgId;
  320 + $('#login_error').addClass('display-none').text('');
  321 + $('#login-licenseMsg').val('');
  322 + $('#login_licensemodel').modal('show');
  323 + $('#login_error').removeClass('display-none').text('License不存在');
  324 +
  325 + }else if(res.code == "2013"){
  326 + // $('#login_error_ifo').text("License已经过期");
  327 + loginorgID=$('#login-licenseID').val(res.data.orgId);
  328 + $('#login_error').addClass('display-none').text('');
  329 + $('#login-licenseMsg').val('');
  330 + $('#login_licensemodel').modal('show');
  331 + $('#login_error').removeClass('display-none').text('License已经过期');
  332 +
  333 + }else if(res.code == "2014"){
  334 + // $('#login_error_ifo').text("License不合法");
  335 + loginorgID=$('#login-licenseID').val(res.data.orgId);
  336 + $('#login_error').addClass('display-none').text('');
  337 + $('#login-licenseMsg').val('');
  338 + $('#login_licensemodel').modal('show');
  339 + $('#login_error').removeClass('display-none').text('License不合法');
316 340 }
317 341 else {
318   - console.log(res.code);
  342 + console.log(res.code);
319 343 $('.verification-logo').removeClass('glyphicon glyphicon-remove').addClass('glyphicon glyphicon-ok');
320 344 $('#login_error_ifo').text("系统错误");
321   - // $error.text(res.msg);
322   - // getImgCode();
  345 + // $error.text(res.msg);
  346 + // getImgCode();
323 347 }
324 348  
325   -}
326 349 \ No newline at end of file
  350 +}
  351 +//确定 事件 (上报license 授权码)
  352 +documentBindFunc.on('click','#loginl-submit',function () {
  353 + updateSysLicense();
  354 +})
  355 +//上报license 授权码
  356 +function updateSysLicense() {
  357 + var licenseID=$('#login-licenseMsg').val();
  358 + if(licenseID==null||licenseID==''||licenseID==undefined){
  359 + $('#login_error').removeClass('display-none').text('License授权码不能为空');
  360 + return;
  361 + }
  362 + var req = {
  363 + sysCode:sysComm.sysCode,
  364 + orgId: loginorgID,
  365 + license: licenseID
  366 + };
  367 + var licenseAjax = {
  368 + method: "post",
  369 + url: dataUrl.util.updateSysLicenseByOrgId(),
  370 + data: JSON.stringify(req),
  371 + contentType: 'application/json; charset=utf-8',
  372 + dataType: 'json',
  373 + success: function (res) {
  374 + if (res.code == '8888') {
  375 + $('#login-licenseMsg').val('');
  376 + $('#login_licensemodel').modal('hide');
  377 + } else {
  378 + console.log(res);
  379 + }
  380 + }
  381 + };
  382 + sysAjax(licenseAjax);
  383 +};
... ...
assets/pages/scripts/vipmanageFile/cardRule/cardrule.js
... ... @@ -98,28 +98,28 @@ var cardruleFun={
98 98 if(res.code == '8888') {
99 99 var data = res.data;
100 100 if(data != null){
101   - $.each(data,function(index,row){
102   - cardActAmountTotal+= row.cardActAmount;
103   - carNumTotalTotal += row.carNumTotal;
104   - recentExpcarNumTotalTotal += row.recentExpcarNumTotal;
105   - if(row.cardType == 1 || row.cardType == 6){//年卡
106   - cardActAmountTotalYears +=row.cardActAmount;
107   - carNumTotalTotalYears += row.carNumTotal;
108   - recentExpcarNumTotalYears += row.recentExpcarNumTotal;
109   - }else if(row.cardType == 3){//季卡
110   - cardActAmountTotalSeason +=row.cardActAmount;
111   - carNumTotalTotalSeason += row.carNumTotal;
112   - recentExpcarNumTotalSeason += row.recentExpcarNumTotal;
113   - }else if(row.cardType == 4 || row.cardType == 7 ){//月卡
114   - cardActAmountTotalMonth +=row.cardActAmount;
115   - carNumTotalTotalMonth += row.carNumTotal;
116   - recentExpcarNumTotalMonth += row.recentExpcarNumTotal;
117   - }else{
118   - cardActAmountTotalOthers +=row.cardActAmount;
119   - carNumTotalTotalOthers += row.carNumTotal;
120   - recentExpcarNumTotalOthers += row.recentExpcarNumTotal;
121   - }
122   - });
  101 + $.each(data,function(index,row){
  102 + cardActAmountTotal+= row.cardActAmount;
  103 + carNumTotalTotal += row.carNumTotal;
  104 + recentExpcarNumTotalTotal += row.recentExpcarNumTotal;
  105 + if(row.cardType == 1 || row.cardType == 6){//年卡
  106 + cardActAmountTotalYears +=row.cardActAmount;
  107 + carNumTotalTotalYears += row.carNumTotal;
  108 + recentExpcarNumTotalYears += row.recentExpcarNumTotal;
  109 + }else if(row.cardType == 3){//季卡
  110 + cardActAmountTotalSeason +=row.cardActAmount;
  111 + carNumTotalTotalSeason += row.carNumTotal;
  112 + recentExpcarNumTotalSeason += row.recentExpcarNumTotal;
  113 + }else if(row.cardType == 4 || row.cardType == 7 ){//月卡
  114 + cardActAmountTotalMonth +=row.cardActAmount;
  115 + carNumTotalTotalMonth += row.carNumTotal;
  116 + recentExpcarNumTotalMonth += row.recentExpcarNumTotal;
  117 + }else{
  118 + cardActAmountTotalOthers +=row.cardActAmount;
  119 + carNumTotalTotalOthers += row.carNumTotal;
  120 + recentExpcarNumTotalOthers += row.recentExpcarNumTotal;
  121 + }
  122 + });
123 123 $("#cardActAmountTotal").text(cardruleFun.moneyFormatter(cardActAmountTotal)); //总金额
124 124 $("#carNumTotalTotal").text(carNumTotalTotal); //总授权车辆数
125 125 $("#recentExpcarNumTotalTotal").text(recentExpcarNumTotalTotal); //近期失效总数
... ... @@ -152,14 +152,14 @@ var cardruleFun={
152 152 fn.getCarType(function (data){
153 153 var html="<option value='ALL'>所有车型</option>";
154 154 if(data != null){
155   - $.each(data,function(index,row){
156   - if("大型车" == row.codeValueName){
157   - html += "<option value='1'>" + row.codeValueName + "</option>";
158   - }else{
159   - html += "<option value='2'>" + row.codeValueName + "</option>";
160   - }
161   -
162   - });
  155 + $.each(data,function(index,row){
  156 + if("大型车" == row.codeValueName){
  157 + html += "<option value='1'>" + row.codeValueName + "</option>";
  158 + }else{
  159 + html += "<option value='2'>" + row.codeValueName + "</option>";
  160 + }
  161 +
  162 + });
163 163 $('#carType').html(html);
164 164 $('#carType').selectpicker('refresh');
165 165 }
... ... @@ -623,30 +623,30 @@ var cardruleFun={
623 623 if (res.code=='8888') {
624 624 var data = res.data;
625 625 var html ="";
626   - if(data != null && data.length >0){
627   - $('#error-ifo-add').removeClass('display-none').text('');
628   -
629   - $.each(data,function(index,row){
630   - if(index == 0){
631   - $("#cardTypeAdd").removeAttr("value");
632   - $("#cardTypeAdd").attr("value",row.cardType);
633   - $("#carTypeAdd").text(cardruleFun.carTypeFormatter(row.carType));
634   - $("#effExDateAdd").text(cardruleFun.inDatatimeFormatter(row.effDate)+" - "+cardruleFun.inDatatimeFormatter(row.expDate));
635   - $("#priceAdd").text(cardruleFun.moneyFormatter(row.price));
636   - $("#disCountValueAdd").text((row.discValue == null || row.discValue =="" || row.discValue == undefined) ? "无折扣" : row.discValue +"折");
637   - $("#cardTypeAdd").text(cardruleFun.cardTypeFormatter(row.cardType));
638   - }
639   - html += "<option value='"+row.cardNo+"' carType='"+row.carType+"' effDate='"+cardruleFun.inDatatimeFormatter(row.effDate)+"' expDate='"+cardruleFun.inDatatimeFormatter(row.expDate)+"' " +
640   - " price='"+row.price+"' discValue='"+row.discValue+"' cardType='"+row.cardType+"'>"
641   - + row.cardName + "</option>";
642   - });
643   - $('#cardrulepop-cardName').html(html);
644   - $('#cardrulepop-cardName').selectpicker('refresh');
  626 + if(data != null && data.length >0){
  627 + $('#error-ifo-add').removeClass('display-none').text('');
  628 +
  629 + $.each(data,function(index,row){
  630 + if(index == 0){
  631 + $("#cardTypeAdd").removeAttr("value");
  632 + $("#cardTypeAdd").attr("value",row.cardType);
  633 + $("#carTypeAdd").text(cardruleFun.carTypeFormatter(row.carType));
  634 + $("#effExDateAdd").text(cardruleFun.inDatatimeFormatter(row.effDate)+" - "+cardruleFun.inDatatimeFormatter(row.expDate));
  635 + $("#priceAdd").text(cardruleFun.moneyFormatter(row.price));
  636 + $("#disCountValueAdd").text((row.discValue == null || row.discValue =="" || row.discValue == undefined) ? "无折扣" : row.discValue +"折");
  637 + $("#cardTypeAdd").text(cardruleFun.cardTypeFormatter(row.cardType));
  638 + }
  639 + html += "<option value='"+row.cardNo+"' carType='"+row.carType+"' effDate='"+cardruleFun.inDatatimeFormatter(row.effDate)+"' expDate='"+cardruleFun.inDatatimeFormatter(row.expDate)+"' " +
  640 + " price='"+row.price+"' discValue='"+row.discValue+"' cardType='"+row.cardType+"'>"
  641 + + row.cardName + "</option>";
  642 + });
  643 + $('#cardrulepop-cardName').html(html);
  644 + $('#cardrulepop-cardName').selectpicker('refresh');
645 645 }else{
646   - $("#carTypeAdd").removeAttr("value");
647   - $('#cardrulepop-cardName').html("<option>所有卡名称</option>");
648   - $('#error-ifo-add').removeClass('display-none').text('该停车场没有创建会员卡,请在【卡规则设置】页面创建会员卡');
649   - return;
  646 + $("#carTypeAdd").removeAttr("value");
  647 + $('#cardrulepop-cardName').html("<option>所有卡名称</option>");
  648 + $('#error-ifo-add').removeClass('display-none').text('该停车场没有创建会员卡,请在【卡规则设置】页面创建会员卡');
  649 + return;
650 650 }
651 651 }
652 652  
... ... @@ -691,7 +691,7 @@ var cardruleFun={
691 691 $(document).on('click','#alert_sure',function(){
692 692 $("#alert_sure").attr("disabled","disabled");
693 693 var checkFlg = false;
694   - //1.判断是否添加会员卡
  694 + //1.判断是否添加会员卡
695 695 var ulDocument = $("#card-list-main").find('ul');
696 696 var cardNames=$("#cardrulepop-cardName").find("option:selected").val();
697 697 if(cardNames== '' || cardNames == undefined || cardNames == null){
... ... @@ -705,13 +705,13 @@ var cardruleFun={
705 705 }
706 706 //2.先判断是否每条都做校验
707 707 $.each(ulDocument,function(index,row){
708   - var verificationName = $(this).find('li').find('.verification-btn').text();
709   - if("校验" == verificationName){
710   - $("#alert_sure").removeAttr("disabled");
711   - checkFlg = true;
712   - $('#error-ifo-add').removeClass('display-none').text('未校验,请先校验');
713   - return;
714   - }
  708 + var verificationName = $(this).find('li').find('.verification-btn').text();
  709 + if("校验" == verificationName){
  710 + $("#alert_sure").removeAttr("disabled");
  711 + checkFlg = true;
  712 + $('#error-ifo-add').removeClass('display-none').text('未校验,请先校验');
  713 + return;
  714 + }
715 715 });
716 716 if(checkFlg){
717 717 return ;
... ... @@ -761,11 +761,11 @@ var cardruleFun={
761 761 });
762 762  
763 763 var carData = [];
764   - $.each(detailList,function(index,rows){
765   - var datas= rows.carNumber;
  764 + $.each(detailList,function(index,rows){
  765 + var datas= rows.carNumber;
766 766  
767   - carData.push(datas);
768   - });
  767 + carData.push(datas);
  768 + });
769 769 console.log(carData);
770 770 var nary=carData.sort();
771 771 for(var i=0;i<carData.length;i++){
... ... @@ -777,7 +777,7 @@ var cardruleFun={
777 777  
778 778 }
779 779  
780   - //保存数据
  780 + //保存数据
781 781 var req = {
782 782 sysCode: sysComm.sysCode,
783 783 cardNo: cardNo,
... ... @@ -898,9 +898,9 @@ documentBindFunc.on(&#39;click&#39;,&#39;#card-add-btn&#39;,function () {
898 898 // $(this).find('.verification-btn').text('校验').css('color','#1E95CD');
899 899 var d = new Date(ev.date);
900 900 var nums=$(this).parent().parent('ul').find('.car-num-inp').val();
901   - /* if(nums=='' ||nums==undefined || nums==null ||nums==NaN){
902   - return nums=0;
903   - }*/
  901 + /* if(nums=='' ||nums==undefined || nums==null ||nums==NaN){
  902 + return nums=0;
  903 + }*/
904 904 var cardTypeAddValue = $('#cardTypeAdd').attr("value");
905 905 if(cardTypeAddValue=='1' || cardTypeAddValue == '6' ){
906 906 $(this).parent().parent().find('.enddate-inp').text(moment(d).add('month', (12*nums)).format('YYYY-MM-DD'));
... ... @@ -1018,34 +1018,34 @@ $(&#39;#card-list-main&#39;).delegate(&#39;.verification-btn&#39;,&#39;click&#39;,function () {
1018 1018 }else {
1019 1019 // //;
1020 1020 //
1021   - var getdisVal = $("#cardrulepop-cardName").find("option:selected").attr("discValue");
1022   - if(getdisVal == null || getdisVal == "" || getdisVal == undefined){
1023   - getdisVal=10;
1024   - }
1025   - var disVal=(getdisVal)/10;//折扣
1026   - var timeVal=$(this).parent().parent('ul').find(".card-daterange-btnsta").val()+" 00:00:00";//生效时间
1027   - var d = new Date(timeVal);
1028   - $(this).parent().parent().find('.car-money-inp').text(numinp*($("#priceAdd").text())*disVal);//实收金额
1029   - //失效时间
1030   -
1031   - var cardTypeAddValue = $('#cardTypeAdd').attr("value");
1032   - if(cardTypeAddValue=='1' || cardTypeAddValue == '6' ){
1033   - $(this).parent().parent().find('.enddate-inp').text((moment(d).add('month', (12*numinp))).format('YYYY-MM-DD'));
1034   - }else if(cardTypeAddValue == '2'){
1035   - $(this).parent().parent().find('.enddate-inp').text((moment(d).add('month', (6*numinp))).format('YYYY-MM-DD'));
1036   - }else if(cardTypeAddValue == '3'){
1037   - $(this).parent().parent().find('.enddate-inp').text((moment(d).add('month', (3*numinp))).format('YYYY-MM-DD'));
1038   - }else if(cardTypeAddValue == '4' || cardTypeAddValue == '7'){
1039   - $(this).parent().parent().find('.enddate-inp').text((moment(d).add('month', (1*numinp))).format('YYYY-MM-DD'));
1040   - }else if(cardTypeAddValue =='5'){
1041   - $(this).parent().parent().find('.enddate-inp').text((moment(d).add('day', (1*numinp))).format('YYYY-MM-DD'));
1042   - }
  1021 + var getdisVal = $("#cardrulepop-cardName").find("option:selected").attr("discValue");
  1022 + if(getdisVal == null || getdisVal == "" || getdisVal == undefined){
  1023 + getdisVal=10;
  1024 + }
  1025 + var disVal=(getdisVal)/10;//折扣
  1026 + var timeVal=$(this).parent().parent('ul').find(".card-daterange-btnsta").val()+" 00:00:00";//生效时间
  1027 + var d = new Date(timeVal);
  1028 + $(this).parent().parent().find('.car-money-inp').text(numinp*($("#priceAdd").text())*disVal);//实收金额
  1029 + //失效时间
  1030 +
  1031 + var cardTypeAddValue = $('#cardTypeAdd').attr("value");
  1032 + if(cardTypeAddValue=='1' || cardTypeAddValue == '6' ){
  1033 + $(this).parent().parent().find('.enddate-inp').text((moment(d).add('month', (12*numinp))).format('YYYY-MM-DD'));
  1034 + }else if(cardTypeAddValue == '2'){
  1035 + $(this).parent().parent().find('.enddate-inp').text((moment(d).add('month', (6*numinp))).format('YYYY-MM-DD'));
  1036 + }else if(cardTypeAddValue == '3'){
  1037 + $(this).parent().parent().find('.enddate-inp').text((moment(d).add('month', (3*numinp))).format('YYYY-MM-DD'));
  1038 + }else if(cardTypeAddValue == '4' || cardTypeAddValue == '7'){
  1039 + $(this).parent().parent().find('.enddate-inp').text((moment(d).add('month', (1*numinp))).format('YYYY-MM-DD'));
  1040 + }else if(cardTypeAddValue =='5'){
  1041 + $(this).parent().parent().find('.enddate-inp').text((moment(d).add('day', (1*numinp))).format('YYYY-MM-DD'));
  1042 + }
1043 1043 var expDate = $.trim(_ul.find('.enddate-inp').text());//结束时间
1044 1044 console.log(expDate)
1045 1045 var todayDate= moment().subtract('days', 0).format('YYYY-MM-DD');
1046 1046 //失效时间 校验
1047 1047 if(expDate =="" || expDate == null || expDate == undefined){
1048   - $('#error-ifo-add').removeClass('display-none').text('失效时间不能为空,请重新选择失效时间');
  1048 + $('#error-ifo-add').removeClass('display-none').text('失效时间不能为空,请重新选择失效时间');
1049 1049 return;
1050 1050 }
1051 1051  
... ... @@ -1320,7 +1320,9 @@ documentBindFunc.on(&#39;click&#39;,&#39;.renewMon&#39;,function () {
1320 1320 if(new Date(parkInfo.effDate)>new Date(parkInfo.expDate)){
1321 1321 $("#card-daterangesta-renew").text(cardruleFun.datetimeFormatter(parkInfo.effDate));
1322 1322 }else {
1323   - $("#card-daterangesta-renew").text(cardruleFun.datetimeFormatter(parkInfo.expDate));
  1323 + var sdate=new Date(cardruleFun.datetimeFormatter(parkInfo.expDate)+' 00:00:00');
  1324 + sdate=sdate.setDate(sdate.getDate()+1);
  1325 + $("#card-daterangesta-renew").text(cardruleFun.datetimeFormatter(sdate));
1324 1326 }
1325 1327  
1326 1328 var renewDate= $("#card-daterangesta-renew").text()+' 00:00:00';
... ... @@ -1645,33 +1647,33 @@ documentBindFunc.on(&#39;click&#39;,&#39;#renewlicesen-sure&#39;,function (){
1645 1647 detailList:detailList
1646 1648 };
1647 1649 if(flg){
1648   - flg = false;
  1650 + flg = false;
1649 1651 $("#renewlicesen-sure").attr("disabled","disabled");
1650   - var opt = {
1651   - method: 'post',
1652   - url: dataUrl.util.changeVipCardCustInfoCarNumberById(),
1653   - data: JSON.stringify(req),
1654   - contentType: 'application/json; charset=utf-8',
1655   - dataType: 'json',
1656   - success: function (res) {
1657   - if(res.code=='8888'){
1658   - flg = true;
1659   - $("#renewlicesen-sure").removeAttr("disabled");
1660   - $('#error-ifo-licesen').addClass('display-none').text("");
1661   - $('#renewlicesen_alertmodel').modal('hide');
1662   - $("#cardrule-table").bootstrapTable('refresh');
1663   - //汇总查询
1664   - cardruleFun.queryVipCardOrderDetailTotal();
1665   - }else{
1666   - flg = true;
1667   - $("#renewlicesen-sure").removeAttr("disabled");
1668   - $('#error-ifo-licesen').removeClass('display-none').text(res.msg);
1669   - return;
1670   - }
  1652 + var opt = {
  1653 + method: 'post',
  1654 + url: dataUrl.util.changeVipCardCustInfoCarNumberById(),
  1655 + data: JSON.stringify(req),
  1656 + contentType: 'application/json; charset=utf-8',
  1657 + dataType: 'json',
  1658 + success: function (res) {
  1659 + if(res.code=='8888'){
  1660 + flg = true;
  1661 + $("#renewlicesen-sure").removeAttr("disabled");
  1662 + $('#error-ifo-licesen').addClass('display-none').text("");
  1663 + $('#renewlicesen_alertmodel').modal('hide');
  1664 + $("#cardrule-table").bootstrapTable('refresh');
  1665 + //汇总查询
  1666 + cardruleFun.queryVipCardOrderDetailTotal();
  1667 + }else{
  1668 + flg = true;
  1669 + $("#renewlicesen-sure").removeAttr("disabled");
  1670 + $('#error-ifo-licesen').removeClass('display-none').text(res.msg);
  1671 + return;
  1672 + }
1671 1673  
1672   - }
1673   - };
1674   - sysAjax(opt);
  1674 + }
  1675 + };
  1676 + sysAjax(opt);
1675 1677 }
1676 1678  
1677 1679 });
... ... @@ -1958,7 +1960,7 @@ documentBindFunc.on(&#39;click&#39;, &#39;#excleTemplate&#39;, function() {
1958 1960  
1959 1961 //上传filestr.................................................
1960 1962 $('#uplate_sure').on('click', function() {
1961   - var url =dataUrl.util.batchImportVipCardCustInfo();
  1963 + var url =dataUrl.util.batchImportVipCardCustInfo();
1962 1964 ajaxSubmit("form1",url,function(res){
1963 1965 if(res.code == '8888') {
1964 1966 var data = res.data;
... ... @@ -2045,19 +2047,19 @@ $(&#39;#uplate_sure&#39;).on(&#39;click&#39;, function() {
2045 2047 });
2046 2048 }
2047 2049 });
2048   - function ajaxSubmit(formId,url,callback){
2049   - $("#"+formId).ajaxSubmit({
2050   - url: url, //后台方法的路径
2051   - type: 'post', //当要提交自定义参数时,这个参数要设置成post
2052   - dataType: 'json', //服务器返回的数据类型。可以为xml,script,json,html。如果不填写,jQuery会自动判断。
2053   - beforeSend: function (xhr) {
2054   - xhr.setRequestHeader("x-auth-token", fn.getToken());
2055   - },
2056   - success: function(data) { // data 保存提交后返回的数据,一般为 json 数据
2057   - callback(data);
2058   - }
2059   - });
2060   - };
  2050 + function ajaxSubmit(formId,url,callback){
  2051 + $("#"+formId).ajaxSubmit({
  2052 + url: url, //后台方法的路径
  2053 + type: 'post', //当要提交自定义参数时,这个参数要设置成post
  2054 + dataType: 'json', //服务器返回的数据类型。可以为xml,script,json,html。如果不填写,jQuery会自动判断。
  2055 + beforeSend: function (xhr) {
  2056 + xhr.setRequestHeader("x-auth-token", fn.getToken());
  2057 + },
  2058 + success: function(data) { // data 保存提交后返回的数据,一般为 json 数据
  2059 + callback(data);
  2060 + }
  2061 + });
  2062 + };
2061 2063  
2062 2064  
2063 2065  
... ...