123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- function check(){
- if (confirm("确认是否提交本次报销单,点击确定提交开始审批,点击取消关闭本窗口。"))
- return true;
- else return false;
- }
- function receiptYear(){
- var form = $('#up');
- $('#year').val($('#Y').val());
- form.submit();
- }
- function receiptMoth(){
- var form = $('#up');
- $('#year').val($('#Y').val());
- $('#month').val($('#M').val());
- //alert($('#M').val());
- form.submit();
- }
- function receiptDay(){
- var form = $('#up');
- $('#year').val($('#Y').val());
- $('#month').val($('#M').val());
- $('#day').val($('#D').val());
- form.submit();
- }
- function receiptSop(){
- var form = $('#up');
- $('#year').val($('#Y').val());
- $('#month').val($('#M').val());
- $('#day').val($('#D').val());
- $('#sop').val($('#S').val());
- form.submit();
- }
- function updateApprovalReceipt(status,rid){
- var form = $('#verifyOpinion_'+rid);
- $('#status_'+rid).val(status);
- form.submit();
- }
- function expensesDefray(status,rid){
- var form = $('#verifyOpinion_'+rid);
- $('#status_'+rid).val(status);
- form.submit();
- }
- function showOpinion(receiptOrder){
- console.log(receiptOrder);
- $('#orderBody').html('读取中');
- var url="/ajaxGetReceiptOrder";
-
- $.ajax({
- url:url,
- type: "post",
- cache: false,
- dataType: "json",
- data: {
- receiptOrder:receiptOrder
- },
- global: true,
- success: function(data){
- if(data.status==1)
- $('#orderBody').html(data.receiptHtml);
- else
- $('#orderBody').html('没找到信息');
- },
- error:function(err){
- }
- });
- }
- $(function() {
- $("a[id^=examine]").click(function(){
- var rid=$(this).attr('data');
- var url="/ajaxExamine";
-
- $.ajax({
- url:url,
- type: "post",
- cache: false,
- dataType: "json",
- data: {
- rid:rid
- },
- global: true,
- success: function(data){
-
- if(data.status==0){
- alert('参数错误');
- }
-
- var count=data.receipt.length;
-
- if(count!=0){
-
- if(data.receipt.Rtype==1){
- window.location.href="/expensesEdi/"+data.receipt.rid;
- }else if(data.receipt.Rtype==0){
- window.location.href="/receiptburEdi/"+data.receipt.rid;
- }else if(data.receipt.Rtype==2){
- window.location.href="/remitApproval/"+data.receipt.rid;
-
- }
-
-
- }else
- alert('没有需要审批的费用');
-
-
- console.log(data);
-
- },
- error:function(err){
- }
- });
-
-
- });
-
-
-
-
-
- $("input[id^='agency_']").change(function() {
-
- $i=0;
- $("input[id^='agency_']").each(function(i){
- $i+=parseFloat(this.value);
-
- });
- $("#agencyResult").html("¥"+$i.toFixed(2));
- $("#agencyR").val($i.toFixed(2));
-
- var travelR=parseFloat($("#travelR").val());
- var trainR=parseFloat($("#trainR").val());
- var otherR=parseFloat($("#otherR").val());
- var RS=parseFloat($i)+parseFloat(travelR)+parseFloat(trainR)+parseFloat(otherR);
-
- $("#RS").html("¥"+RS.toFixed(2));
- });
-
- $("input[id^='travel_']").change(function() {
-
- $i=0;
- $("input[id^='travel_']").each(function(i){
- $i+=parseFloat(this.value);
-
- });
- $("#travelResult").html("¥"+$i.toFixed(2));
- $("#travelR").val($i.toFixed(2));
-
- var agencyR=$("#agencyR").val();
- var trainR=parseFloat($("#trainR").val());
- var otherR=parseFloat($("#otherR").val());
- var RS=parseFloat($i)+parseFloat(agencyR)+trainR+otherR;
-
- $("#RS").html("¥"+RS.toFixed(2));
- });
-
- $("input[id^='train_']").change(function() {
-
- $i=0;
- $("input[id^='train_']").each(function(i){
- $i+=parseFloat(this.value);
-
- });
- $("#trainResult").html("¥"+$i.toFixed(2));
- $("#trainR").val($i.toFixed(2));
-
- var agencyR=$("#agencyR").val();
- var otherR=parseFloat($("#otherR").val());
- var travelR=parseFloat($("#travelR").val());
- var RS=parseFloat($i)+parseFloat(agencyR)+travelR+otherR;
-
- $("#RS").html("¥"+RS.toFixed(2));
- });
-
- $("input[id^='other_']").change(function() {
-
- $i=0;
- $("input[id^='other_']").each(function(i){
- $i+=parseFloat(this.value);
-
- });
- $("#otherResult").html("¥"+$i.toFixed(2));
- $("#otherR").val($i.toFixed(2));
-
- var agencyR=$("#agencyR").val();
- var travelR=parseFloat($("#travelR").val());
- var trainR=parseFloat($("#trainR").val());
- var RS=parseFloat($i)+parseFloat(agencyR)+parseFloat(travelR)+parseFloat(trainR);
-
- $("#RS").html("¥"+RS.toFixed(2));
- });
-
-
-
- $("input[id^='RG_']").click(function() {
-
-
-
- });
-
-
-
- $("a[id^='getStaffInfo']").click(function(){
-
- var username=$(this).attr('data');
-
- var url="/getStaffInfo";
-
- $.ajax({
- url:url,
- type: "post",
- cache: false,
- dataType: "json",
- data: {
- username:username
- },
- global: true,
- success: function(data){
-
- if(data.success){
- alert('请重新登录');
- }
-
- $('#staffInfo').html(data.html);
- $('#staffInfo').show();
- $('#longleLog').hide();
- $('#clientInfo').hide();
- $('#changeCompany').hide();
- },
- error:function(err){
- }
- });
- });
-
- $("a[id^='getClientInfo']").click(function(){
- var client=$(this).attr('data');
-
- var url="/getClientInfo";
-
- $.ajax({
- url:url,
- type: "post",
- cache: false,
- dataType: "json",
- data: {
- client:client
- },
- global: true,
- success: function(data){
-
- if(data.success){
- alert('请重新登录');
- }
-
- $('#clientInfo').html(data.html);
- $('#clientInfo').show();
- $('#staffInfo').hide();
- $('#longleLog').hide();
- $('#addClient').hide();
- $('#changeCompany').hide();
- autoFlashHeight();
- },
- error:function(err){
- autoFlashHeight();
- }
- });
-
- });
-
- $("a[id^='getCompanyInfo']").click(function(){
- alert('dd');
- });
-
- $("a[id^='getLongleLog_']").click(function() {
-
- var lid=$(this).attr('data');
-
- var url="/ajaxGetLongle";
-
- $.ajax({
- url:url,
- type: "post",
- cache: false,
- dataType: "json",
- data: {
- lid:lid
- },
- global: true,
- success: function(data){
-
- if(data.success==false){
- alert('请重新登录');
- }
-
- $("#klid").val(data.klid);
-
- $("#longleTitle").html(data.longle.key_num);
-
- var lka='<a href="javascript:void(0)" onclick="getStaffInfo(\''+data.longle.responsible+'\')" >'+data.longle.responsible+'</a>';
-
- $("#longleResponsible").html(lka);
-
- var kk="";
- if(data.longle.alloted_time!="")
- kk="期限:"+data.longle.alloted_time;
-
- $("#longleStatus").html(data.longle.statusT+"/"+data.longle.product+"/("+data.longle.version+")"+kk);
-
- $("#LongleLogHtml").html(data.longleLogHtml);
-
- if(data.longle.status>=3){
- $("#longleStatus_5").attr('disabled',false);
- $("#longleStatus_6").attr('disabled',false);
- $("#longleStatus_7").attr('disabled',false);
- $("#longleStatus_8").attr('disabled',false);
- }
- $('#staffInfo').hide();
- $("#longleLog").show();
- $('#clientInfo').hide();
- autoFlashHeight();
- },
- error:function(err){
- // easyDialog.open({
- // container : { content : '请输入正确的参数'},
- // autoClose : 1500,
- // overlay : false
- // });
- }
- });
-
- });
- })
- function selectToolTipCl(name){
- var e = is_ie ? event : selectToolTipCl.caller.arguments[0];
- obj = is_ie ? e.srcElement : e.target;
- var arr = document.getElementsByName(name);
- var k = arr.length;
- for ( var i = 0; i < k; i++) {
- arr[i].checked = obj.checked;
- }
- $('#addToolTag').hide();
- }
- function selectTagCl(name){
- var e = is_ie ? event : selectTagCl.caller.arguments[0];
- obj = is_ie ? e.srcElement : e.target;
- var arr = document.getElementsByName(name);
- var k = arr.length;
- for ( var i = 0; i < k; i++) {
- arr[i].checked = obj.checked;
- }
- }
- function checkall(name) {
- var e = is_ie ? event : checkall.caller.arguments[0];
- obj = is_ie ? e.srcElement : e.target;
- var arr = document.getElementsByName(name);
- var k = arr.length;
- for ( var i = 0; i < k; i++) {
- arr[i].checked = obj.checked;
- }
- }
- if (is_ie)
- document.documentElement.addBehavior("#default#userdata");
- var userAgent = navigator.userAgent.toLowerCase();
- var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);
|