Browse Source

修改收款单位

outaozhen 7 years ago
parent
commit
f1dfde312d
2 changed files with 427 additions and 151 deletions
  1. 16 1
      invoiceBilingDetailsReceive.html
  2. 411 150
      js/sui/global.js

+ 16 - 1
invoiceBilingDetailsReceive.html

@@ -49,7 +49,7 @@
             <div class="bar bar-header-secondary barBig">
               <div class="row" style="overflow: inherit;">
                 <div class="col-50"><a href="invoiceBiling.html" class="button button-big button-block button-fill button-danger">取消</a></div>
-                <div class="col-50"><a href="" class="button button-big button-block button-fill button-success prompt-ok">确定收款</a></div>
+                <div class="col-50"><a href="" class="button button-big button-block button-fill button-success">确定收款</a></div>
               </div>
             </div>
             <div class="content">
@@ -102,6 +102,21 @@
                     </li>
                   </ul>
                 </div>
+                <div class="content-block-title">单位名称</div>
+                <div class="list-block">
+                  <ul>
+                    <li class="item-content">
+                      <div class="item-inner">
+                        <div class="card-content">
+                          <textarea class="myinput" placeholder="请输入开票单位名称"></textarea>
+                          <!-- <div class="card-content-inner card-content-inner-lnot">
+                              
+                          </div> -->
+                        </div>
+                      </div>
+                    </li>
+                  </ul>
+                </div>
               </div>
             </div>
         </div>

+ 411 - 150
js/sui/global.js

@@ -3,34 +3,168 @@ $(function(){
       var buttons1 = [
         {
           text: '请假类型',
-          label: true,
+          label: true
         },
         {
           text: '事假',
           bold: true,
-          // onClick: function() {
-          //   $.alert("你选择了“事假“");
-          // }
+           onClick: function() {
+               $('#holidaytypeshow').attr('placeholder','假期类型 [ 事假 ]');
+               $('#holidaytypeshow').val('事假');
+               $('#otherholiday').hide();
+               $('#holidaytype').val(1);
+               $('.tab').removeClass('active');
+               $('.align-top').show();
+               $('#holidayshow').hide();
+               $('.haveholidaynum').hide();
+               $('.tab').find('input').attr('disabled',true);
+               $('.tab').find('textarea').attr('disabled',true);
+               $('#tab1').addClass('active');
+               $('#tab1').find('input').removeAttr('disabled');
+               $('#tab1').find('textarea').removeAttr('disabled');
+               $('.tabtitle').text('事假');
+               $('#typenum').val(1);
+           }
         },
         {
           text: '病假',
+            onClick: function() {
+                $('#holidaytypeshow').attr('placeholder','假期类型 [ 病假 ]');
+                $('#holidaytypeshow').val('病假');
+                $('#otherholiday').hide();
+                $('#holidaytype').val(2);
+                $('.tab').removeClass('active');
+                $('.align-top').show();
+                $('#holidayshow').hide();
+                $('.haveholidaynum').hide();
+                $('.tab').find('input').attr('disabled',true);
+                $('.tab').find('textarea').attr('disabled',true);
+                $('#tab1').addClass('active');
+                $('#tab1').find('input').removeAttr('disabled');
+                $('#tab1').find('textarea').removeAttr('disabled');
+                $('.tabtitle').text('病假');
+                $('#typenum').val(1);
+            }
         },
         {
           text: '年假',
+            onClick: function() {
+                $('#holidaytypeshow').attr('placeholder','假期类型 [ 年假 ]');
+                $('#holidaytypeshow').val('年假');
+                $('#otherholiday').hide();
+                $('#holidaytype').val(12);
+                $('#holidayshow').hide();
+                $('.tab').removeClass('active');
+                //$('.haveholidaynum').show();
+                $('.tab').find('input').attr('disabled',true);
+                $('.tab').find('textarea').attr('disabled',true);
+                $('#tab5').addClass('active');
+                $('#tab5').find('input').removeAttr('disabled');
+                //$('#tab5').find('textarea').removeAttr('disabled');
+                //$('.tabtitle').text('年假');
+                //$('.holidayname').text('年假');
+                //$('#holidaynum').val('你的年假 '+$('#nianjia').val()+' 天');
+                //$('.align-top').hide();
+                //$('.align-top').find('textarea').attr('disabled',true);
+                $('#typenum').val(1);
+                if($('#nianjia').val() == 0){
+                    $('#holidayshow span').text('年假');
+                    $('#holidayshow').show();
+                }
+            }
         },
         {
           text: '加班',
+            onClick: function() {
+                $('#holidaytypeshow').attr('placeholder','假期类型 [ 加班 ]');
+                $('#holidaytypeshow').val('加班');
+                $('#otherholiday').hide();
+                $('#holidaytype').val(4);
+                $('.tab').removeClass('active');
+                $('.align-top').show();
+                $('#holidayshow').hide();
+                $('.haveholidaynum').hide();
+                $('.tab').find('input').attr('disabled',true);
+                $('.tab').find('textarea').attr('disabled',true);
+                $('#tab1').addClass('active');
+                $('#tab1').find('input').removeAttr('disabled');
+                $('#tab1').find('textarea').removeAttr('disabled');
+                $('.tabtitle').text('加班');
+                $('#typenum').val(1);
+            }
         },
         {
           text: '补休',
+            onClick: function() {
+                $('#holidaytypeshow').attr('placeholder','假期类型 [ 补休 ]');
+                $('#holidaytypeshow').val('补休');
+                $('#otherholiday').hide();
+                $('#holidaytype').val(10);
+                $('.tab').removeClass('active');
+                $('.align-top').show();
+                $('#holidayshow').hide();
+                $('.haveholidaynum').show();
+                $('.tab').find('input').attr('disabled',true);
+                $('.tab').find('textarea').attr('disabled',true);
+                $('#tab1').addClass('active');
+                $('#tab1').find('input').removeAttr('disabled');
+                $('#tab1').find('textarea').removeAttr('disabled');
+                $('.tabtitle').text('补休');
+                $('.holidayname').text('存假');
+                $('#holidaynum').val('你的存假 '+$('#cunjia').val()+' 天');
+                $('#typenum').val(1);
+                if($('#cunjia').val() == 0){
+                    $('#holidayshow span').text('存假');
+                    $('#holidayshow').show();
+                }
+            }
         },
-        {
-          text: '其他',
-        }
+        //{
+        //  text: '其他',
+        //    onClick: function() {
+        //        $('#holidaytypeshow').attr('placeholder','假期类型 [ 其他 ]');
+        //        $('#holidaytypeshow').val('其他');
+        //        $('#otherholiday').show();
+        //        $('#otherholidayshow').attr('placeholder','其他类型 [ 调休 ]');
+        //        $('#otherholidayshow').val('调休');
+        //        $('#holidaytype').val(11);
+        //        $('.align-top').show();
+        //        $('#holidayshow').hide();
+        //        $('.tab').removeClass('active');
+        //        $('.tab').find('input').attr('disabled',true);
+        //        $('.tab').find('textarea').attr('disabled',true);
+        //        $('#tab2').addClass('active');
+        //        $('#tab2').find('input').removeAttr('disabled');
+        //        $('#tab2').find('textarea').removeAttr('disabled');
+        //        $('#typenum').val(2);
+        //    }
+        //}
+          {
+              text: '其他',
+              onClick: function() {
+                  $('#holidaytypeshow').attr('placeholder','假期类型 [ 其他 ]');
+                  $('#holidaytypeshow').val('其他');
+                  $('#otherholiday').show();
+                  $('#otherholidayshow').attr('placeholder','其他类型 [ 值班 ]');
+                  $('#otherholidayshow').val('值班');
+                  $('#holidaytype').val(5);
+                  $('.tab').removeClass('active');
+                  $('.align-top').show();
+                  $('#holidayshow').hide();
+                  $('.haveholidaynum').hide();
+                  $('.tab').find('input').attr('disabled',true);
+                  $('.tab').find('textarea').attr('disabled',true);
+                  $('#tab1').addClass('active');
+                  $('#tab1').find('input').removeAttr('disabled');
+                  $('#tab1').find('textarea').removeAttr('disabled');
+                  $('.tabtitle').text('值班');
+                  $('#typenum').val(1);
+              }
+          }
       ];
       var buttons2 = [
         {
-          text: '取消',
+          text: '取消'
         }
       ];
       var groups = [buttons1, buttons2];
@@ -41,144 +175,236 @@ $(function(){
       var buttons1 = [
         {
           text: '其他类型',
-          label: true,
+          label: true
+        },
+        //{
+        //  text: '调休',
+        //  bold: true,
+        //  onClick: function() {
+        //      $('#otherholidayshow').attr('placeholder','其他类型 [ 调休 ]');
+        //      $('#otherholidayshow').val('调休');
+        //      $('#holidaytype').val(11);
+        //      $('.align-top').show();
+        //      $('#holidayshow').hide();
+        //      $('.tab').removeClass('active');
+        //      $('.tab').find('input').attr('disabled',true);
+        //      $('.tab').find('textarea').attr('disabled',true);
+        //      $('#tab2').addClass('active');
+        //      $('#tab2').find('input').removeAttr('disabled');
+        //      $('#tab2').find('textarea').removeAttr('disabled');
+        //      $('#typenum').val(2);
+        //  }
+        //},
+        {
+          text: '值班',
+           onClick: function() {
+               $('#otherholidayshow').attr('placeholder','假期类型 [ 值班 ]');
+               $('#otherholidayshow').val('值班');
+               $('#holidaytype').val(5);
+               $('.tab').removeClass('active');
+               $('.align-top').show();
+               $('#holidayshow').hide();
+               $('.haveholidaynum').hide();
+               $('.tab').find('input').attr('disabled',true);
+               $('.tab').find('textarea').attr('disabled',true);
+               $('#tab1').addClass('active');
+               $('#tab1').find('input').removeAttr('disabled');
+               $('#tab1').find('textarea').removeAttr('disabled');
+               $('.tabtitle').text('值班');
+               $('#typenum').val(1);
+           }
         },
         {
           text: '婚假',
-          bold: true,
-          // onClick: function() {
-          //   $.alert("你选择了“事假“");
-          // }
+           onClick: function() {
+               $('#otherholidayshow').attr('placeholder','其他类型 [ 婚假 ]');
+               $('#otherholidayshow').val('婚假');
+               $('#holidaytype').val(6);
+               $('.tab').removeClass('active');
+               $('.align-top').show();
+               $('#holidayshow').hide();
+               $('.tab').find('input').attr('disabled',true);
+               $('.tab').find('textarea').attr('disabled',true);
+               $('#tab3').addClass('active');
+               $('#tab3').find('input').removeAttr('disabled');
+               $('#tab3').find('textarea').removeAttr('disabled');
+               $('.tabtitle').text('婚假');
+               $('#typenum').val(3);
+               $('#othernumshow').val('您的假期 '+$('#hunjia').val()+' 天');
+               $('#othernum').val($('#hunjia').val());
+               if($('#hunjia').val() == 0){
+                   $('#holidayshow span').text('婚假');
+                   $('#holidayshow').show();
+               }
+           }
         },
         {
           text: '产假',
+            onClick: function() {
+                $('#otherholidayshow').attr('placeholder','其他类型 [ 产假 ]');
+                $('#otherholidayshow').val('产假');
+                $('#holidaytype').val(7);
+                $('.tab').removeClass('active');
+                $('.align-top').show();
+                $('#holidayshow').hide();
+                $('.tab').find('input').attr('disabled',true);
+                $('.tab').find('textarea').attr('disabled',true);
+                $('#tab3').addClass('active');
+                $('#tab3').find('input').removeAttr('disabled');
+                $('#tab3').find('textarea').removeAttr('disabled');
+                $('.tabtitle').text('产假');
+                $('#typenum').val(3);
+                $('#othernumshow').val('您的假期 '+$('#chanjia').val()+' 天');
+                $('#othernum').val($('#chanjia').val());
+                if($('#chanjia').val() == 0){
+                    $('#holidayshow span').text('产假');
+                    $('#holidayshow').show();
+                }
+            }
         },
         {
           text: '丧假',
+            onClick: function() {
+                $('#otherholidayshow').attr('placeholder','其他类型 [ 丧假 ]');
+                $('#otherholidayshow').val('丧假');
+                $('#holidaytype').val(8);
+                $('.tab').removeClass('active');
+                $('.align-top').show();
+                $('#holidayshow').hide();
+                $('.tab').find('input').attr('disabled',true);
+                $('.tab').find('textarea').attr('disabled',true);
+                $('#tab3').addClass('active');
+                $('#tab3').find('input').removeAttr('disabled');
+                $('#tab3').find('textarea').removeAttr('disabled');
+                $('.tabtitle').text('丧假');
+                $('#typenum').val(3);
+                $('#othernumshow').val('您的假期 '+$('#sangjia').val()+' 天');
+                $('#othernum').val($('#sangjia').val());
+                if($('#sangjia').val() == 0){
+                    $('#holidayshow span').text('丧假');
+                    $('#holidayshow').show();
+                }
+            }
         },
         {
           text: '工伤假',
-        },
-        {
-          text: '调休',
+            onClick: function() {
+                $('#otherholidayshow').attr('placeholder','其他类型 [ 工伤假 ]');
+                $('#otherholidayshow').val('工伤假');
+                $('#holidaytype').val(9);
+                $('.tab').removeClass('active');
+                $('.align-top').show();
+                $('#holidayshow').hide();
+                $('.tab').find('input').attr('disabled',true);
+                $('.tab').find('textarea').attr('disabled',true);
+                $('#tab3').addClass('active');
+                $('#tab3').find('input').removeAttr('disabled');
+                $('#tab3').find('textarea').removeAttr('disabled');
+                $('.tabtitle').text('工伤假');
+                $('#typenum').val(3);
+                $('#othernumshow').val('您的假期 '+$('#gongjia').val()+' 天');
+                $('#othernum').val($('#gongjia').val());
+                if($('#gongjia').val() == 0){
+                    $('#holidayshow span').text('工伤假');
+                    $('#holidayshow').show();
+                }
+            }
         }
       ];
       var buttons2 = [
         {
-          text: '取消',
+          text: '取消'
         }
       ];
       var groups = [buttons1, buttons2];
       $.actions(groups);
   });
 
-  $(document).on('click','.create-actionsFuwu', function () {
-      var buttons1 = [
-        {
-          text: '服务方式',
-          label: true,
-        },
-        {
-          text: '上门服务',
-          bold: true,
-        },
-        {
-          text: '电话拜访',
-        },
-        {
-          text: '其他',
-        }
-      ];
-      var buttons2 = [
-        {
-          text: '取消',
-        }
-      ];
-      var groups = [buttons1, buttons2];
-      $.actions(groups);
-  });
-
-  $(document).on('click','.create-actionsJilu', function () {
-      var buttons1 = [
-        {
-          text: '记录类型',
-          label: true,
-        },
-        {
-          text: '借出',
-          bold: true,
-        },
-        {
-          text: '销售',
-        },
-        {
-          text: '升级',
-        },
-        {
-          text: '更换',
-          bold: true,
-        },
-        {
-          text: '收回',
-        },
-        {
-          text: '备注',
-        }
-      ];
-      var buttons2 = [
-        {
-          text: '取消',
+  //  var date = new Date();
+  //  var year = date.getFullYear();
+  //  var month = date.getMonth() + 1;
+  //  var day = date.getDate();
+  //$("#datetime-picker-star").datetimePicker({
+  //    toolbarTemplate: '<header class="bar bar-nav">\
+  //<button class="button button-link pull-right close-picker">确定</button>\
+  //<h1 class="title">请选择开始时间</h1>\
+  //</header>',
+  //    value: [year, month, day, '8', '30']
+  //});
+    $("#datetime-picker-star").calendar({
+        onChange : function(e,value,day){
+            $.alert(e);
         }
-      ];
-      var groups = [buttons1, buttons2];
-      $.actions(groups);
-  });
+    });
 
-  $(".datetime-picker-star").datetimePicker({
-    value: ['2017', '02', '16', '8', '30']
-  });
+    $("#datetime-picker-end").calendar({
+        onChange : function(e,value){
 
-  $(".datetime-picker-end").datetimePicker({
-    value: ['2017', '02', '16', '18', '00']
-  });
+        }
+    });
 
-  $(".toast1").on('click',function(e){
-    if($(e.target).is('input')){
-        return;
-      };
-    var msg = $(this).children("input[type='checkbox']");
-    if (msg.is(':checked')){
-      $.toast("您取消上午请假");
-    }else{
-      $.toast("您选择上午请假");
-    };
-  });
+  //$("#datetime-picker-end").datetimePicker({
+  //    toolbarTemplate: '<header class="bar bar-nav">\
+  //<button class="button button-link pull-right close-picker">确定</button>\
+  //<h1 class="title">请选择结束时间</h1>\
+  //</header>',
+  //});
 
   $(document).on('click','.confirm-ok', function () {
       $.prompt('填写你的审批意见', function (value) {
-          $.alert('你的审批意见: ' + value );
+          $.alert('你的审批意见: ' + value , function(){
+              ajaxapproval(2,value);
+          });
       });
   });
   $(document).on('click','.confirm-cancel', function () {
       $.prompt('不同意原因', function (value) {
-          $.alert('你的审批意见:' + value);
+          $.alert('你的审批意见:' + value , function(){
+              ajaxapproval(3,value);
+          });
       });
   });
+    function ajaxapproval(isagree,value){
+        $.ajax({
+            type: 'post',
+            url: '/approvalrequest/'+$('#hid').val(),
+            data: {isagree: isagree, description: value},
+            dataType: 'json',
+            success: function(data){
+                if(data.code == 200){
+                    if(isagree == 2){
+                        var text = '同意';
+                    }else{
+                        var text = '不同意';
+                    }
+                    $('#thisapprover').children('.item-after').text(text);
+                    if(value.length > 10){
+                        $('#thisapprover').children('.itemView').text(value.substring(0,10)+"...");
+                    }else{
+                        $('#thisapprover').children('.itemView').text(value);
+                    }
+                    $('#thisapprover').children('.itemView').attr('longmsg',value);
+                    $('.barBig').remove();
+                    $.toast('已审批');
+                    if(parseInt($('.badge').text())-1 == 0){
+                        $('.badge').remove();
+                    }else{
+                        $('.badge').text(parseInt($('.badge').text())-1);
+                    }
+                }else{
+                    $.alert(data.msg);
+                }
+            }
+        });
+    }
 
-  $(document).on('click','.open-about', function () {
-    $.popup('.popup-aboutTime');
-  });
+  //$(document).on('click','.open-about', function () {
+  //    $.popup('.popup-aboutTime');
+  //});
 
   $(document).on('click','.itemView',function () {
-        $.alert('审批意见审批意见,审批意见');
+        $.alert($(this).attr('longmsg'));
      });
-
-  $(document).on('click','.prompt-ok', function () {
-      $.prompt('请输入输入开票单位名称', function (value) {
-          $.alert('开票单位名称 "' + value + '"请点击确定');
-      });
-  });
-
   $(document).on("pageInit", "#page-city-picker", function(e) {
     $("#city-picker").cityPicker({
         value: ['广东', '珠海','香洲区']
@@ -186,6 +412,7 @@ $(function(){
   });
   $.init();
 
+  
   $("#pickerOffice").picker({
     toolbarTemplate: '<header class="bar bar-nav">\
     <button class="button button-link pull-right close-picker">确定</button>\
@@ -194,7 +421,7 @@ $(function(){
     cols: [
       {
         textAlign: 'center',
-        values: ['安徽办', '甘肃办', '广东办', '广西办', '江西办', '四川办', '重庆办', '内蒙办', '浙江办', '山东办', '总部', '云南办', '贵州办']
+        values: category
       }
     ]
   });
@@ -207,7 +434,7 @@ $(function(){
     cols: [
       {
         textAlign: 'center',
-        values: ['纵横公路工程造价管理系统V9.0', '纵横公路造价编审软件V9.0', '纵横公路工程设计数量表算量软件V3.1', '纵横公路工程计量支付决算一体化软件V3.1', '建材在线', '服务费', '培训费', '软件升级费', '软件报表定制费', '技术服务费']
+        values: element
       }
     ]
   });
@@ -219,11 +446,23 @@ $(function(){
           label: true,
         },
         {
-          text: '增值税普通发票 ',
+          text: '增值税普通发票',
           bold: true,
+          onClick: function() {
+        	  $('#plainInvoice_box').show();
+         	 $('#specialInvoice_box').hide();
+         	$('#invoiceTypeName').val('增值税普通发票');
+         	$('#invoiceType').val(0);
+            }
         },
         {
           text: '增值税专用发票',
+          onClick: function() {
+        	  $('#plainInvoice_box').hide();
+         	 $('#specialInvoice_box').show();
+         	$('#invoiceTypeName').val('增值税专用发票');
+         	$('#invoiceType').val(1);
+            }
         }
       ];
       var buttons2 = [
@@ -244,9 +483,21 @@ $(function(){
         {
           text: '是 ',
           bold: true,
+          onClick: function() {
+        	  $('#mail_box').show();
+        	  $('#doPostName').val('是 ');
+        	  $('#doPost').val(1);
+        	  
+            }
         },
         {
           text: '否',
+          onClick: function() {
+        	  $('#mail_box').hide();
+        	  $('#doPostName').val('否 ');
+        	  $('#doPost').val(0);
+        	 
+            }
         }
       ];
       var buttons2 = [
@@ -257,32 +508,42 @@ $(function(){
       var groups = [buttons1, buttons2];
       $.actions(groups);
   });
+});
 
-  $(document).on('click','.invoiceExpress', function () {
-      var buttons1 = [
-        {
-          text: '选择快递公司',
-          label: true,
-        },
-        {
-          text: 'EMS快递 ',
-          bold: true,
-        },
-        {
-          text: '顺丰快递',
-        }
-      ];
-      var buttons2 = [
-        {
-          text: '取消',
-        }
-      ];
-      var groups = [buttons1, buttons2];
-      $.actions(groups);
-  });
 
-});
 
+$(document).on('click','.invoiceExpress', function () {
+    var buttons1 = [
+      {
+        text: '选择快递公司',
+        label: true,
+      },
+      {
+        text: 'EMS快递',
+        bold: true,
+        onClick: function() {
+      	  $('#untreadCompanyName').val('EMS快递');
+      	  $('#untreadCompany').val('EMS快递:ems');
+      	  
+          }
+      },
+      {
+        text: '顺丰快递',
+        onClick: function() {
+      	  $('#untreadCompanyName').val('顺丰速运');
+      	  $('#untreadCompany').val('顺丰速运:shunfeng');
+      	  
+          }
+      }
+    ];
+    var buttons2 = [
+      {
+        text: '取消',
+      }
+    ];
+    var groups = [buttons1, buttons2];
+    $.actions(groups);
+});
 
 $(function(){  
     var t = $('#myinput');
@@ -362,22 +623,22 @@ $(function(){
       });
     });
 
-    $(document).ready(function(){
-      //加的效果
-      $(".add").click(function(){
-      var n=$(this).prev().val();
-      var num=parseInt(n)+1;
-      if(num==0){ return;}
-      $(this).prev().val(num);
-      });
-      //减的效果
-      $(".jian").click(function(){
-      var n=$(this).next().val();
-      var num=parseInt(n)-1;
-      if(num==0){ return}
-      $(this).next().val(num);
-      });
-    });
 
+});
 
-});
+$(document).ready(function(){
+    //加的效果
+    $(".add").click(function(){
+    var n=$(this).prev().val();
+    var num=parseInt(n)+1;
+    if(num==0){ return;}
+    $(this).prev().val(num);
+    });
+    //减的效果
+    $(".jian").click(function(){
+    var n=$(this).next().val();
+    var num=parseInt(n)-1;
+    if(num==0){ return}
+    $(this).next().val(num);
+    });
+  });