Browse Source

工会相关

caipin 5 years atrás
parent
commit
0e0b16fce3

File diff suppressed because it is too large
+ 22 - 0
global/js/echarts.common.min.js


+ 27 - 0
global/js/index.js

@@ -1606,6 +1606,33 @@ $(function() {
 	
 	a();
 	
+	$('a[ghToken]').click(function(){
+		
+		var url="/auth/token";
+		$.ajax({
+			url:url,
+			type: "post",
+			cache: false,
+			dataType: "json",
+			
+			success: function(data){
+				console.log(data);
+				if(data.status==1){
+					window.open("http://gh.cld.smartcost.com.cn/login/"+data.auth+"/"+data.staff,"_blank"); 
+				}else{
+					alert('授权失败');
+					
+				}
+			},
+			error:function(err){
+			}
+			});
+		
+		
+		
+		
+	});
+	
 	$("input[id^='longleStatus_']").click(function() {
 		
 		var lid=$(this).val();

+ 29 - 0
global/js/pay.validator.js

@@ -0,0 +1,29 @@
+$(function() {
+	// 添加员工验证
+	$('#paymentsIncome').validator({
+		timely : 3,
+		focusCleanup : true,
+
+		fields : {
+			accountType : 'required;',
+			receivedPrice : 'required;',
+			receivedMsg : 'required;',
+			receivedDate : 'required;'
+
+		}
+	});
+
+	// 更新员工验证
+	$('#paymentsExpenditure').validator({
+		timely : 3,
+		focusCleanup : true,
+		fields : {
+			expenditureType : 'required;',
+			expenditureDate:'required;',
+			expenditurePrice : 'required;'
+
+		}
+	});
+
+	
+})

+ 388 - 0
global/js/payments.js

@@ -0,0 +1,388 @@
+
+$(function() {
+	
+	$('select[node-payMentsSelect]').change(function() {
+		 var payVal=$(this).val();
+		 
+		 if(payVal=="INCOME"){
+			 $('#INCOMEBox').show();
+			 $('#EXPENDITUREBox').hide();
+		 }else if(payVal=="EXPENDITURE"){
+			 $('#INCOMEBox').hide();
+			 $('#EXPENDITUREBox').show();
+		 }
+	});
+	
+	$('select[node-accountTypeSelect]').change(function() {
+		 var payVal=$(this).val();
+		 if(payVal=="1"){
+			 $('div[node-accountMsg1]').show();
+			 $('div[node-accountMsg2]').hide();
+			 $('div[node-accountMsg4]').hide();
+			 $('div[node-accountMsg7]').hide();
+			 $('div[node-accountMsg9]').hide();
+		 }else if(payVal=="2"){
+			 $('div[node-accountMsg1]').hide();
+			 $('div[node-accountMsg2]').show();
+			 $('div[node-accountMsg4]').hide();
+			 $('div[node-accountMsg7]').hide();
+			 $('div[node-accountMsg9]').hide();
+		 }else if(payVal=="4"){
+			 $('div[node-accountMsg1]').hide();
+			 $('div[node-accountMsg2]').hide();
+			 $('div[node-accountMsg4]').show();
+			 $('div[node-accountMsg7]').hide();
+			 $('div[node-accountMsg9]').hide();
+		 }else if(payVal=="7"){
+			 $('div[node-accountMsg1]').hide();
+			 $('div[node-accountMsg2]').hide();
+			 $('div[node-accountMsg4]').hide();
+			 $('div[node-accountMsg7]').show();
+			 $('div[node-accountMsg9]').hide();
+		 }else if(payVal=="9"){
+			 $('div[node-accountMsg1]').hide();
+			 $('div[node-accountMsg2]').hide();
+			 $('div[node-accountMsg4]').hide();
+			 $('div[node-accountMsg7]').hide();
+			 $('div[node-accountMsg9]').show();
+		 }else{
+			 $('div[node-accountMsg1]').hide();
+			 $('div[node-accountMsg2]').hide();
+			 $('div[node-accountMsg4]').hide();
+			 $('div[node-accountMsg7]').hide();
+			 $('div[node-accountMsg9]').hide();
+		 }
+	});
+	
+	$('select[node-expenditureTypeSelect]').change(function() {
+		 var payVal=$(this).val();
+		
+		 if(payVal=="3"){
+			 $('div[node-expenditureMsg3]').show();
+			 $('div[node-expenditureMsg4]').hide();
+			 $('div[node-expenditureMsg6]').hide();
+		 }else if(payVal=="4"){
+			 $('div[node-expenditureMsg3]').hide();
+			 $('div[node-expenditureMsg4]').show();
+			 $('div[node-expenditureMsg6]').hide();
+		 }else if(payVal=="6"){
+			 $('div[node-expenditureMsg3]').hide();
+			 $('div[node-expenditureMsg4]').hide();
+			 $('div[node-expenditureMsg6]').show();
+		 }else{
+			 $('div[node-expenditureMsg3]').hide();
+			 $('div[node-expenditureMsg4]').hide();
+			 $('div[node-expenditureMsg6]').hide();
+		 }
+	});
+	
+	$('select[node-accountTypeSearch]').change(function() {
+		
+		$("#submitType").val(1);
+		 $('#iaa').submit();
+	});
+	$('select[node-expenditureTypeSearch]').change(function() {
+		
+		$("#submitType").val(2);
+		 $('#iaa').submit();
+	});
+	
+	$('select[select-wasteBook]').change(function() {
+		 $('#ira').submit();
+	});
+	
+	
+	$('a[node-income=detail]').click(function() {
+		
+		var key=$(this).attr("data-isKey");
+		$('div[node-accountMsg1]').hide();
+		 $('div[node-accountMsg2]').hide();
+		 $('div[node-accountMsg4]').hide();
+		 $('div[node-accountMsg7]').hide();
+		
+		var url = "/ajaxGetPaymentsByAid";
+		$.ajax({
+			url : url,
+			type : "post",
+			cache : false,
+			dataType : "json",
+			data : {
+				serial : key,
+			},
+			global : true,
+			success : function(data) {
+				if (data.status == 1) {
+					$("#accountTypeEdi").find("option[value='"+data.detail.accountType+"']").attr("selected",true);
+					 $('div[node-accountMsg'+data.detail.accountType+']').show();
+					 $("input[name=accountMsg"+data.detail.accountType+"][value="+data.detail.accountMsg+"]").attr("checked",true);
+					 
+					 $("#receivedBank").find("option[value='"+data.detail.receivedBank+"']").attr("selected",true);
+					 
+					 $("#receivedPrice").val(data.detail.receivedPrice);
+					 $("#receivedMsg").val(data.detail.receivedMsg);
+					 $("#receivedDate").val(data.detail.receivedDate);
+					 $("#aidKeyIncome").val(data.detail.aidKey);
+					 
+				} else
+					$("div[loading-msg='true']").html("illegal request");
+			},
+			error : function(err) {
+				$("div[loading-msg='true']").html("");
+				$("#nr").html('');
+			}
+		});
+	});
+	
+$('a[node-EXPENDITURE=detail]').click(function() {
+		
+		var key=$(this).attr("data-isKey");
+		$('div[node-expenditureMsg3]').hide();
+		
+		var url = "/ajaxGetPaymentsByAid";
+		$.ajax({
+			url : url,
+			type : "post",
+			cache : false,
+			dataType : "json",
+			data : {
+				serial : key,
+			},
+			global : true,
+			success : function(data) {
+				if (data.status == 1) {
+					$("#expenditureTypeEdi").find("option[value='"+data.detail.expenditureType+"']").attr("selected",true);
+					 $('div[node-expenditureMsg'+data.detail.expenditureType+']').show();
+					 $("input[name=expenditureMsg"+data.detail.expenditureType+"][value="+data.detail.expenditureMsg+"]").attr("checked",true);
+					 $("#expenditureBank").find("option[value='"+data.detail.expenditureBank+"']").attr("selected",true);
+					
+					 $("#expenditurePrice").val(data.detail.expenditurePrice);
+					
+					 $("#aidKeyExpenditure").val(data.detail.aidKey);
+				} else
+					$("div[loading-msg='true']").html("illegal request");
+			},
+			error : function(err) {
+				$("div[loading-msg='true']").html("");
+				$("#nr").html('');
+			}
+		});
+	});
+	
+
+$('a[del-income=detail]').click(function() {
+	
+	var key=$(this).attr("data-isKey");
+	$("#aidKeyDel").val(key);
+	
+});
+
+$('a[node-pay=waste]').click(function() {
+	
+	var key=$(this).attr("data-key");
+	var url = "/ajaxGetPaymentsByAid";
+	
+	$.ajax({
+		url : url,
+		type : "post",
+		cache : false,
+		dataType : "json",
+		data : {
+			serial : key,
+		},
+		global : true,
+		success : function(data) {
+			if (data.status == 1) {
+				$("#WI-wasteStaff").html(data.detail.staffDetail.username+'-'+data.detail.staffDetail.category);
+				
+				$("#WI-bookSerial").html(data.detail.bookSerial);
+				$("#WI-expenditureMsg").html(data.detail.expenditureTypeMsg);
+				$("#WI-expenditurePrice").html(data.detail.expenditurePrice);
+				$("#WI-expenditureBank").html(data.detail.expenditureBank);
+				$("#WI-expenditureDate").html(data.detail.expenditureDate);
+				$("#WI-remarks").html(data.detail.remarks);
+				
+			} else
+				$("div[loading-msg='true']").html("illegal request");
+		},
+		error : function(err) {
+			$("div[loading-msg='true']").html("");
+		}
+	});
+});
+
+$('a[node-income=waste]').click(function() {
+	
+	var key=$(this).attr("data-key");
+	var url = "/ajaxGetPaymentsByAid";
+	
+	$.ajax({
+		url : url,
+		type : "post",
+		cache : false,
+		dataType : "json",
+		data : {
+			serial : key,
+		},
+		global : true,
+		success : function(data) {
+			if (data.status == 1) {
+				$("#IN-wasteStaff").html(data.detail.staffDetail.username+'-'+data.detail.staffDetail.category);
+				
+				$("#IN-bookSerial").html(data.detail.bookSerial);
+				$("#IN-expenditureMsg").html(data.detail.incomeTypeMsg);
+				$("#IN-expenditurePrice").html(data.detail.receivedPrice);
+				$("#IN-expenditureBank").html(data.detail.receivedBank);
+				$("#IN-expenditureDate").html(data.detail.receivedDate);
+				$("#IN-remarks").html(data.detail.remarks);
+				
+			} else
+				$("div[loading-msg='true']").html("illegal request");
+		},
+		error : function(err) {
+			$("div[loading-msg='true']").html("");
+		}
+	});
+});
+
+$('a[node-ir=waste]').click(function() {
+	
+	var key=$(this).attr("data-key");
+	var url = "/ajaxGetWasteinvoiceReceivables";
+	
+	$.ajax({
+		url : url,
+		type : "post",
+		cache : false,
+		dataType : "json",
+		data : {
+			serial : key,
+		},
+		global : true,
+		success : function(data) {
+			if (data.status == 1) {
+				$("#IR-wasteStaff").html(data.detail.inputStaff);
+				
+				$("#IR-bookSerial").html(data.detail.receivablesSerial);
+				$("#IR-expenditureMsg").html(data.detail.receivablesMessage);
+				$("#IR-expenditurePrice").html(data.detail.OriginalPrice);
+				$("#IR-expenditureBank").html(data.detail.receivablesBank);
+				$("#IR-expenditureDate").html(data.detail.receivablesDate);
+				
+				
+			} else
+				$("div[loading-msg='true']").html("illegal request");
+		},
+		error : function(err) {
+			$("div[loading-msg='true']").html("");
+		}
+	});
+});
+
+
+$('a[node-i=waste]').click(function() {
+	
+	var key=$(this).attr("data-key");
+	var url = "/ajaxGetWasteInvoice";
+	
+	$.ajax({
+		url : url,
+		type : "post",
+		cache : false,
+		dataType : "json",
+		data : {
+			serial : key,
+		},
+		global : true,
+		success : function(data) {
+			if (data.status == 1) {
+				$("#IR-wasteStaff").html(data.detail.userName);
+				
+				$("#IR-bookSerial").html(data.detail.invoiceNo);
+				$("#IR-expenditureMsg").html(data.detail.invoiceElement);
+				$("#IR-expenditurePrice").html(data.detail.invoicePrice);
+				$("#IR-expenditureBank").html(data.detail.receivablesBank);
+				$("#IR-expenditureDate").html(data.detail.bindTime);
+				
+				
+			} else
+				$("div[loading-msg='true']").html("illegal request");
+		},
+		error : function(err) {
+			$("div[loading-msg='true']").html("");
+		}
+	});
+});
+
+
+
+$('a[node-ir11=waste]').click(function() {
+	
+	var key=$(this).attr("data-key");
+	var url = "/ajaxGetWasteinvoiceReceivables";
+	
+	$.ajax({
+		url : url,
+		type : "post",
+		cache : false,
+		dataType : "json",
+		data : {
+			serial : key,
+		},
+		global : true,
+		success : function(data) {
+			if (data.status == 1) {
+				$("#IR11-wasteStaff").html(data.detail.inputStaff);
+				
+				$("#IR11-bookSerial").html(data.detail.receivablesSerial);
+				$("#IR11-expenditureMsg").html(data.detail.receivablesMessage);
+				$("#IR11-expenditurePrice").html(data.detail.refundPrice);
+				$("#IR11-expenditureBank").html(data.detail.receivablesBank);
+				$("#IR11-expenditureDate").html(data.detail.receivablesDate);
+				
+				
+			} else
+				$("div[loading-msg='true']").html("illegal request");
+		},
+		error : function(err) {
+			$("div[loading-msg='true']").html("");
+		}
+	});
+});
+
+
+$('a[node-receipt=waste]').click(function() {
+	
+	var key=$(this).attr("data-key");
+	var accountTypeKey=$(this).attr("data-accountTypeKey");
+	var url = "/ajaxGetWasteReceipt";
+	
+	$("#wasteReceipt").html('');
+	
+	$.ajax({
+		url : url,
+		type : "post",
+		cache : false,
+		dataType : "json",
+		data : {
+			serial : key,
+			accountTypeKey:accountTypeKey
+		},
+		global : true,
+		success : function(data) {
+			if (data.status == 1) {
+				$("#wasteReceipt").html(data.html);
+				
+			} else
+				$("div[loading-msg='true']").html("illegal request");
+		},
+		error : function(err) {
+			$("div[loading-msg='true']").html("");
+		}
+	});
+});
+
+
+
+	
+})
+

+ 3 - 2
global/js/receipt.js

@@ -120,6 +120,9 @@ function showOpinion(receiptOrder){
 
 $(function() {
 
+	
+	
+	
 	$('select[node-implement]').change(function(){
 		//$item=$(this).attr('value');
 		
@@ -129,8 +132,6 @@ $(function() {
 		$('#up').submit();
 		
 		
-		
-		console.log();
 	});
 	
 	$('button[node-qmk="tm"]').click(function(){

+ 102 - 0
global/js/receiptExtend.js

@@ -0,0 +1,102 @@
+
+$(function() {
+
+	$('button[node-qmk="tm"]').click(function(){
+		var id=$(this).attr('data');
+		$('#'+id).attr('value',$('#'+id).attr('data-tm'));
+
+	});
+	
+	$('a[receiptWasteDetail]').click(function(){
+		
+		var ridKey=$(this).attr('data');
+		var url="/ajaxGetReceiptDetailByJson";
+		$.ajax({
+			url:url,
+			type: "post",
+			cache: false,
+			dataType: "json",
+			data: {
+				ridKey:ridKey
+			},
+			global: true,
+			success: function(data){
+				if(data.status==1){
+					$('#ridKey').val(data.detail.ridKey);
+					
+					$("#receiptTrainType").hide();
+					$("#receiptType").show();
+					$("#receiptTrainPrice").hide();
+					$("#receiptPrice").show();
+					$("#paymentAuthCode").val('');
+					$("#receiptPrice").html('¥'+data.detail.sum);
+					
+					if(data.detail.Rtype==0){
+						$("#Rtype").html('报销单');
+						$("#receiptType").html('<span class="colRed">支出</span>');
+					}else if(data.detail.Rtype==1){
+						if(data.detail.isBK==0){
+							$("#Rtype").html('借款');
+							$("#receiptType").html('<span class="colRed">支出</span>');
+						}else if(data.detail.isBK==1){
+							$("#Rtype").html('借款(报销)');
+							var rsum =Math.abs((data.detail.sum-data.detail.loanSum));
+							$("#receiptPrice").html('¥'+rsum);
+							if(rsum>=0){
+								$("#receiptType").html('<span class="colGreen">收入</span>');
+							}else{
+								$("#receiptType").html('<span class="colRed">支出</span>');
+							}
+						}
+					}else if(data.detail.Rtype==2){
+						$("#Rtype").html('对公汇款');
+						$("#receiptType").html('<span class="colRed">支出</span>');
+//-------------------------------------------------------------						
+					}else if(data.detail.Rtype==3){
+						$("#Rtype").html('培训班费用');
+						if(data.detail.payment>=0){
+							$("#receiptType").html('<span class="colGreen">收入</span>');
+						}else{
+							$("#receiptType").html('<span class="colRed">支出</span>');
+						}
+						$("#receiptPrice").html('¥'+Math.abs(data.detail.payment));
+						$("#paymentAuthCode").val(data.detail.paymentAuthCode);
+//						$("#receiptTrainType").show();
+//						$("#receiptType").hide();
+//						$("#receiptTrainPrice").show();
+//						$("#receiptPrice").hide();
+					}
+					
+					if(data.detail.status==2){
+						$("#status").html('审批中');
+					}else if(data.detail.status==1 || data.detail.status==6){
+						$("#status").html('执行中');
+					}
+					
+					data.detail.amount=Math.abs(data.detail.amount);
+					$("#sum").html('¥'+data.detail.sum);
+					if(data.detail.amount!=null){
+						if(data.detail.isBK==1){
+							$("#amount").html('¥'+rsum);
+						}else{
+							$("#amount").html('¥'+data.detail.amount);
+						}
+					}else{
+						$("#amount").html('¥0');
+					}
+					
+					
+				}
+			},
+			error:function(err){
+			}
+			});
+	});
+	
+	
+	
+	
+	
+})
+
+

+ 0 - 0
global/js/setting.js


+ 1 - 1
protected/class/receipt.func.php

@@ -1749,7 +1749,7 @@ function makeLecturerData($obj,$lecturerList){
 		
 		$obj->getactivesheet()->setCellValue ( 'C'.$i,$value['schoolDay'] );
 		$obj->getactivesheet()->setCellValue ( 'D'.$i,$value['price'] );
-		$obj->getactivesheet()->setCellValue ( 'E'.$i,$value['sum'] );
+		$obj->getactivesheet()->setCellValue ( 'E'.$i,$value['fees'] );
 		$sumPrice+=$value['sum'];
 		$i++;
 	}

+ 1 - 0
protected/config/acl.conf.php

@@ -491,6 +491,7 @@ $acl ['RECEIPTSEXTEND'] ['allow'] = array (
 				'receiptTrainItemEdiDo',
                 'receiptTrainRevenue',
                 'receiptTrainRevenueAchieve',
+				'receiptSummaryStatisticsByAgency'
 		)
 );
 $acl ['RECEIPTSAJAX'] ['allow'] = array (

+ 1 - 1
protected/config/js.edition.conf.php

@@ -1,6 +1,6 @@
 <?php
 
-define ( "index", WEB_SITE_GLOBAL.'js/index.js?1.07' );
+define ( "index", WEB_SITE_GLOBAL.'js/index.js?1.08' );
 define ( "receiptExtend", WEB_SITE_GLOBAL.'js/receiptExtend.js?1.03' );
 
 define ( "receipt", WEB_SITE_GLOBAL.'js/receipt.js?1.09' );

+ 5 - 0
protected/config/routes.conf.php

@@ -1,5 +1,8 @@
 <?php
 
+
+$route['post']['/auth/token'] = array('ghController', 'authToken');
+
 $route['*']['/emailtext'] = array('ErrorController', 'emailtext');
 
 $route['*']['/category/list.json'] = array('SoftController', 'categoryApi');
@@ -202,6 +205,8 @@ $route['*']['/staffCollectDetail/:staffname'] = array('ReceiptController', 'staf
 $route['*']['/staffCollectDetail'] = array('ReceiptController', 'staffCollectDetail');
 $route['*']['/eMail'] = array('ReceiptController', 'eMail');
 
+$route['*']['/receiptSummaryStatisticsByAgency'] = array('ReceiptExtendController', 'receiptSummaryStatisticsByAgency');
+
 $route['*']['/revocationAdjustment/:sidKey/:price/:ridKey/:reviseKey'] = array('ReceiptController', 'revocationAdjustment');
 
 $route['*']['/staffCollectMonthDetail/:year/:month/:nature'] = array('ReceiptController', 'staffCollectMonthDetail');

+ 5 - 0
protected/controller/MainController.php

@@ -198,6 +198,11 @@ class MainController extends DooController {
 				$staffV2=$crypto->encrypt( $userinfo [0] ['sid'],'CLDV2_CP');
 				setcookie ( "staffV2", $staffV2, time () + 36000, "/" );
 				
+				//工会动态密匙
+				Doo::loadClass ( 'auth' );
+				$auth = new auth ( );
+				$staffGH=$auth->yundanran_auth($userinfo [0] ['sid'],'',"GH");
+				setcookie ( "staffGH", $staffGH, time () + 36000, "/" );
 				return "/";
 			}
 		}

+ 6 - 2
protected/controller/ReceiptAjaxController.php

@@ -205,8 +205,12 @@ class ReceiptAjaxController extends DooController {
 		// 备用金
 		$sum = 0;
 		if (! empty ( $trainLoanRid )) {
-			$receiptLoanDetailBak = $receipt->getReceiptByRid ( $trainLoanRid );
-			$sum = $receiptLoanDetailBak ['sum'];
+			//$receiptLoanDetailBak = $receipt->getReceiptByRid ( $trainLoanRid );
+			$receiptLoanList = $receipt->getReceiptInRid ( $trainLoanRid );
+			foreach ($receiptLoanList as $key=>$value){
+				$sum+=$value['sum'];
+			}
+			//$sum = $receiptLoanDetailBak ['sum'];
 		}
 			
 		// 支出项金额详情

+ 123 - 22
protected/controller/ReceiptController.php

@@ -2281,8 +2281,16 @@ class ReceiptController extends DooController {
 				'sum' => '0.00' 
 		);
 		if (! empty ( $receiptDetail ['trainLoanRid'] )) {
-			$data ['receiptLoanDetail'] = $receipt->getReceiptByRid ( $receiptDetail ['trainLoanRid'] );
-			$sum = $data ['receiptLoanDetail'] ['sum'];
+			//$data ['receiptLoanDetail'] = $receipt->getReceiptInRid ( $receiptDetail ['trainLoanRid'] );
+			$receiptLoanList = $receipt->getReceiptInRid ( $receiptDetail ['trainLoanRid'] );
+			$sum=0;
+			foreach ($receiptLoanList as $key=>$value){
+				$sum+=$value['sum'];
+			}
+			$data ['receiptLoanDetail'] = array (
+					'sum' => $sum
+			);
+			//$sum = $data ['receiptLoanDetail'] ['sum'];
 		}
 		
 		$payment=$sum + $RIAmount - $categoryActualExpenditure;
@@ -2370,6 +2378,7 @@ class ReceiptController extends DooController {
 		
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 7 );
+		
 		$rid = $XDeode->decode ( $ridKey );
 		
 		if (! is_numeric ( $rid ))
@@ -2391,12 +2400,18 @@ class ReceiptController extends DooController {
 		// 获得借款信息
 		$receiptLoanHtml = '';
 		if (! empty ( $receiptDetail ['trainLoanRid'] )) {
-			$receiptLoanDetail = $receipt->getReceiptByRid ( $receiptDetail ['trainLoanRid'] );
-			// 获得某费用单审批信息
-			$verifylist = $verify->getVerifyByRid ( $receiptDetail ['trainLoanRid'] );
-			Doo::loadClass ( 'receipt.func' );
-			$extendHtml = '<p><a class="button" href="javascript:if(window.confirm(\'确认移除?\'))window.location=\'/receiptTrainLoanRemoveDo/' . $receiptDetail ['ridKey'] . '/' . $receiptDetail ['trainLoanRidKey'] . '.html\'" data-toggle="modal">移除借款</a></p>';
-			$receiptLoanHtml = _getReceiptLoanHtml ( $receiptLoanDetail, $verifylist, $extendHtml );
+			$receiptLoanList = $receipt->getReceiptInRid ( $receiptDetail ['trainLoanRid'] );
+			
+			foreach ($receiptLoanList as $key=>$value){
+				// 获得某费用单审批信息
+				$verifylist = $verify->getVerifyByRid ( $value ['rid'] );
+				Doo::loadClass ( 'receipt.func' );
+				$extendHtml = '<p><a class="button" 
+						href="javascript:if(window.confirm(\'确认移除?\'))window.location=\'/receiptTrainLoanRemoveDo/' . $receiptDetail ['ridKey'] . '/' . $value ['ridKey'] . '.html\'" data-toggle="modal">移除借款</a></p>';
+				$receiptLoanHtml .= _getReceiptLoanHtml ( $value, $verifylist, $extendHtml );
+				
+			}
+			
 		}
 		
 		$data ['receiptLoanHtml'] = $receiptLoanHtml;
@@ -2520,10 +2535,15 @@ class ReceiptController extends DooController {
 				die ( 'illegal request-receipLoantError' );
 			}
 			// 培训班结算挂钩借款
+			
 			$receipt = new receipt ();
+			$trainLoanRid=$ridLoan;
+			if (!empty($receiptDetail['trainLoanRid'])){
+				$trainLoanRid=$receiptDetail['trainLoanRid'].','.$ridLoan;
+			}
 			$item = array (
 					'rid' => $rid,
-					'trainLoanRid' => $ridLoan 
+					'trainLoanRid' => $trainLoanRid 
 			);
 			$receipt->setReceiptByCondition ( $item );
 			// 更新借款状态变成已挂钩
@@ -2571,9 +2591,18 @@ class ReceiptController extends DooController {
 			}
 			// 培训班结算挂钩借款
 			$receipt = new receipt ();
+			
+			$trainLoanRidArray=explode(",", $receiptDetail['trainLoanRid']);
+			foreach ($trainLoanRidArray as $key=>$value){
+				if($value==$ridLoan){
+					unset($trainLoanRidArray[$key]);
+				}
+			}
+			$trainLoanRidString=implode(",", $trainLoanRidArray);
+			
 			$item = array (
 					'rid' => $rid,
-					'trainLoanRid' => 0 
+					'trainLoanRid' => $trainLoanRidString 
 			);
 			$receipt->setReceiptByCondition ( $item );
 			// 更新借款状态变成已挂钩
@@ -3493,6 +3522,7 @@ class ReceiptController extends DooController {
 				$receiptList[$key]['balance']=$value['sum']-=$value['loanSum'];
 				$receiptList[$key]['balanceABS']=abs($receiptList[$key]['balance']);
 			}elseif($value['Rtype']==3){
+				
 				$payment=$this->_getReceiptTrainPayment($value['invoiceTrainId'],$value['trainLoanRid'],$value['rid']);
 				$receiptList[$key]['payment']=$payment;
 				$receiptList[$key]['paymentABS']=abs($payment);
@@ -7046,8 +7076,14 @@ class ReceiptController extends DooController {
 				// 备用金
 				$sum = 0;
 				if (! empty ( $value ['trainLoanRid'] )) {
-					$receiptLoanDetailBak = $receipt->getReceiptByRid ( $value ['trainLoanRid'] );
-					$sum = $receiptLoanDetailBak ['sum'];
+					
+					$receiptLoanList = $receipt->getReceiptInRid ( $value ['trainLoanRid'] );
+					foreach ($receiptLoanList as $kll=>$vll){
+						$sum+=$vll['sum'];
+					}
+					
+// 					$receiptLoanDetailBak = $receipt->getReceiptByRid ( $value ['trainLoanRid'] );
+// 					$sum = $receiptLoanDetailBak ['sum'];
 				}
 					
 				// 支出项金额详情
@@ -7064,10 +7100,11 @@ class ReceiptController extends DooController {
 				// 支出项金额详情
 				$aiData = $accountItem->getTrainingDetail ( $RItemList, $RILecturerList, $invoiceArriveAmount );
 				$categoryActualExpenditure = $aiData ['total'] - $aiData ['categoryActualExpenditure'];
-					
+				
 				$payment = $sum + $RIAmount - $categoryActualExpenditure;
 				$receiptList [$key] ['payment'] =$payment;
-				$receiptList [$key] ['paymentABS'] =abs($payment);
+				$receiptList [$key] ['paymentABS'] =sprintf("%.2f",abs($payment));
+				
 				
 			}
 			
@@ -10934,8 +10971,8 @@ class ReceiptController extends DooController {
 		$year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : date ( "Y" );
 		$cid = isset ( $this->params ['cid'] ) && is_numeric ( $this->params ['cid'] ) ? $this->params ['cid'] : 0;
 		
-		$path = SITE_PATH . $this->CATEGORYCOLLECTPATH . "categoryCollectDetail_" . $year . "_" . $cid . ".htmls";
-		$this->showCache ( $path );
+		/* $path = SITE_PATH . $this->CATEGORYCOLLECTPATH . "categoryCollectDetail_" . $year . "_" . $cid . ".htmls";
+		$this->showCache ( $path ); */
 		
 		Doo::loadModel ( 'statistics' );
 		$statistics = new statistics ();
@@ -11078,7 +11115,7 @@ class ReceiptController extends DooController {
 		$data ['verifyId'] = $this->verifyId;
 		$data ['executeId'] = $this->executeId;
 		// year staff status 2,4
-		if ($year < date ( "Y" )) {
+		/* if ($year < date ( "Y" )) {
 			Doo::loadModel ( 'receipt' );
 			$receipt = new receipt ();
 			$receiptList = $receipt->find ( array (
@@ -11091,8 +11128,24 @@ class ReceiptController extends DooController {
 				$this->cacheFile ( $path );
 				die ();
 			}
+		} */
+		
+		$dateHtml = "";
+		$now = date ( "Y" );
+		for($YEARD = 2050; $YEARD >= 2004; $YEARD --) {
+				
+			if ($YEARD <= $now) {
+				$dateHtml .= '<option ';
+				if ($year == $YEARD) {
+					$dateHtml .= 'selected ';
+				}
+				$dateHtml .= 'value="' . $YEARD . '">' . $YEARD . '</option>';
+			}
 		}
 		
+		$data ['dateHtml'] = $dateHtml;
+		
+		
 		$this->render ( "/admin/saeaCategoryCollectDetail", $data );
 	}
 	function staffCollect() {
@@ -13218,6 +13271,9 @@ class ReceiptController extends DooController {
 		// echo $XDeode->encode(9).'<br>';
 		// echo $XDeode->encode(10).'<br>';
 		
+		$year=date("Y");
+		$theDay=date("Y-m-d");
+		
 		$dateArr = explode ( ':', $date );
 		$D1 = '';
 		$D2 = '';
@@ -13230,6 +13286,9 @@ class ReceiptController extends DooController {
 			$con = ' and inputDate BETWEEN "' . $D1 . '" AND "' . $D2 . '" ';
 		elseif (! empty ( $D1 ) && empty ( $D2 ))
 			$con = ' and inputDate = "' . $D1 . '"';
+		else{
+			$con = '  and DATE_FORMAT(inputDate,"%Y")= "'.$year.'" ';
+		}
 		
 		if ($cid != 'ALL') {
 			$cid = $XDeode->decode ( $cid );
@@ -13250,9 +13309,12 @@ class ReceiptController extends DooController {
 		
 		$incomeList = $wasteBook->getAccountBookByExpensesType ( 0, 1, $con );
 		
-		$sum = 0;
+		$sum = 0;$thsDaySum=0;
 		foreach ( $incomeList as $key => $value ) {
 			$sum += $value ['accountPrice'];
+			if($theDay==date("Y-m-d",strtotime($value['inputDate']))){
+				$thsDaySum+=$value ['accountPrice'];
+			}
 		}
 		// print_r($incomeList);
 		
@@ -13265,7 +13327,10 @@ class ReceiptController extends DooController {
 		$data ['sum'] = $sum;
 		$data ['incomeList'] = $incomeList;
 		$data ['inputDate'] = $date;
+		$data['year']=$year;
 		
+		$data ['thsDay'] =$theDay;
+		$data ['thsDaySum'] =$thsDaySum;
 		$data ['memu'] = "receipt";
 		$data ['staff'] = $this->staff;
 		$data ['receiptMemu'] = 'wasteBook';
@@ -13294,6 +13359,9 @@ class ReceiptController extends DooController {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		
+		$year=date("Y");
+		$theDay=date("Y-m-d");
+		
 		$dateArr = explode ( ':', $date );
 		$D1 = '';
 		$D2 = '';
@@ -13306,7 +13374,11 @@ class ReceiptController extends DooController {
 			$con = ' and inputDate BETWEEN "' . $D1 . '" AND "' . $D2 . '" ';
 		elseif (! empty ( $D1 ) && empty ( $D2 ))
 			$con = ' and inputDate = "' . $D1 . '"';
-		
+		else{
+			$con = '  and DATE_FORMAT(inputDate,"%Y")= "'.$year.'" ';
+		}
+			
+			
 		if ($cid != 'ALL') {
 			$cid = $XDeode->decode ( $cid );
 			$con .= ' and cid = "' . $cid . '"';
@@ -13338,9 +13410,13 @@ class ReceiptController extends DooController {
 		
 		$incomeList = $wasteBook->getAccountBookByExpensesType ( 0, 2, $con );
 		
-		$sum = 0;
+		$sum = 0;$thsDaySum=0;
 		foreach ( $incomeList as $key => $value ) {
 			$sum += $value ['accountPriceShow'];
+			
+			if($theDay==date("Y-m-d",strtotime($value['inputDate']))){
+				$thsDaySum+=$value ['accountPriceShow'];
+			}
 		}
 		// print_r($incomeList);
 		
@@ -13353,7 +13429,10 @@ class ReceiptController extends DooController {
 		$data ['sum'] = $sum;
 		$data ['incomeList'] = $incomeList;
 		$data ['inputDate'] = $date;
+		$data['year']=$year;
 		
+		$data ['thsDay'] =$theDay;
+		$data ['thsDaySum'] =$thsDaySum;
 		$data ['memu'] = "receipt";
 		$data ['staff'] = $this->staff;
 		$data ['receiptMemu'] = 'wasteBook';
@@ -15309,6 +15388,21 @@ class ReceiptController extends DooController {
 
         $data ['aiList'] = $aiList;
 
+        
+        $dateHtml = "";
+        $now = date ( "Y" );
+        for($YEARD = 2050; $YEARD >= 2004; $YEARD --) {
+        		
+        	if ($YEARD <= $now) {
+        		$dateHtml .= '<option ';
+        		if ($year == $YEARD) {
+        			$dateHtml .= 'selected ';
+        		}
+        		$dateHtml .= 'value="' . $YEARD . '">' . $YEARD . '</option>';
+        	}
+        }
+        
+        $data ['dateHtml'] = $dateHtml;
 
 
 		$data ['monthHtml'] = $monthHtml;
@@ -16428,8 +16522,15 @@ class ReceiptController extends DooController {
 		// 备用金
 		$sum = 0;
 		if (! empty ( $trainLoanRid )) {
-			$receiptLoanDetailBak = $receipt->getReceiptByRid ( $trainLoanRid );
-			$sum = $receiptLoanDetailBak ['sum'];
+			
+			$receiptLoanList = $receipt->getReceiptInRid ( $trainLoanRid );
+			foreach ($receiptLoanList as $key=>$value){
+				$sum+=$value['sum'];
+			}
+			
+			
+// 			$receiptLoanDetailBak = $receipt->getReceiptByRid ( $trainLoanRid );
+// 			$sum = $receiptLoanDetailBak ['sum'];
 		}
 			
 		// 支出项金额详情

+ 59 - 12
protected/controller/ReceiptExtendController.php

@@ -283,8 +283,16 @@ class ReceiptExtendController extends DooController {
 				'sum' => '0.00' 
 		);
 		if (! empty ( $receiptDetail ['trainLoanRid'] )) {
-			$data ['receiptLoanDetail'] = $receipt->getReceiptByRid ( $receiptDetail ['trainLoanRid'] );
-			$sum = $data ['receiptLoanDetail'] ['sum'];
+			
+			$receiptLoanList = $receipt->getReceiptInRid ( $receiptDetail ['trainLoanRid'] );
+			foreach ($receiptLoanList as $key=>$value){
+				$sum+=$value['sum'];
+			}
+			$data ['receiptLoanDetail'] = array (
+					'sum' => $sum
+			);
+			//$data ['receiptLoanDetail'] = $receipt->getReceiptByRid ( $receiptDetail ['trainLoanRid'] );
+			//$sum = $data ['receiptLoanDetail'] ['sum'];
 		}
 		
 		$payment = $sum + $RIAmount - $categoryActualExpenditure;
@@ -501,12 +509,18 @@ class ReceiptExtendController extends DooController {
 		// 获得借款信息
 		$receiptLoanHtml = '';
 		if (! empty ( $receiptDetail ['trainLoanRid'] )) {
-			$receiptLoanDetail = $receipt->getReceiptByRid ( $receiptDetail ['trainLoanRid'] );
-			// 获得某费用单审批信息
-			$verifylist = $verify->getVerifyByRid ( $receiptDetail ['trainLoanRid'] );
-			Doo::loadClass ( 'receipt.func' );
-			$extendHtml = '';
-			$receiptLoanHtml = _getReceiptLoanHtml ( $receiptLoanDetail, $verifylist, $extendHtml );
+			
+			
+			$receiptLoanList = $receipt->getReceiptInRid ( $receiptDetail ['trainLoanRid'] );
+			foreach ($receiptLoanList as $key=>$value){
+				// 获得某费用单审批信息
+				$verifylist = $verify->getVerifyByRid ( $value ['rid'] );
+				Doo::loadClass ( 'receipt.func' );
+				$extendHtml = '';
+				$receiptLoanHtml .= _getReceiptLoanHtml ( $value, $verifylist, $extendHtml );
+			
+			}
+						
 		}
 		
 		$data ['receiptLoanHtml'] = $receiptLoanHtml;
@@ -1097,8 +1111,15 @@ class ReceiptExtendController extends DooController {
 			// 备用金
 			$sum = 0;
 			if (! empty ( $receiptDetail ['trainLoanRid'] )) {
-				$receiptLoanDetailBak = $receipt->getReceiptByRid ( $receiptDetail ['trainLoanRid'] );
-				$sum = $receiptLoanDetailBak ['sum'];
+				
+				$receiptLoanList = $receipt->getReceiptInRid ( $receiptDetail ['trainLoanRid'] );
+				foreach ($receiptLoanList as $key=>$value){
+					$sum+=$value['sum'];
+				}
+				
+				
+// 				$receiptLoanDetailBak = $receipt->getReceiptByRid ( $receiptDetail ['trainLoanRid'] );
+// 				$sum = $receiptLoanDetailBak ['sum'];
 			}
 			
 			// 支出项金额详情
@@ -2238,8 +2259,14 @@ class ReceiptExtendController extends DooController {
 		// 备用金
 		$sum = 0;
 		if (! empty ( $trainLoanRid )) {
-			$receiptLoanDetailBak = $receipt->getReceiptByRid ( $trainLoanRid );
-			$sum = $receiptLoanDetailBak ['sum'];
+			
+			$receiptLoanList = $receipt->getReceiptInRid ( $trainLoanRid );
+			foreach ($receiptLoanList as $key=>$value){
+				$sum+=$value['sum'];
+			}
+			
+// 			$receiptLoanDetailBak = $receipt->getReceiptByRid ( $trainLoanRid );
+// 			$sum = $receiptLoanDetailBak ['sum'];
 		}
 			
 		// 支出项金额详情
@@ -2626,6 +2653,26 @@ class ReceiptExtendController extends DooController {
         $this->render ( "/receipt/receiptTrainRevenueAchieve", $data );
     }
 
+    /*
+     * 全年办事处汇总明细
+     */
+    function receiptSummaryStatisticsByAgency(){
+    	
+    	
+    	
+    	
+    	$data ['memu'] = "receipt";
+    	$data ['staff'] = $this->staff;
+    	
+    	$data ['receiptMemu'] = 'receiptTrainRevenue';
+    	$data ['verifyId'] = $this->verifyId;
+    	$data ['executeId'] = $this->executeId;
+    	
+    	$this->render ( "/receipt/receiptSummaryStatisticsByAgency", $data );
+    }
+    
+    
+    
 	function exportReceiptTrainExcel() {
 		$rtidKey = $this->get_args ( 'rtidKey' ) ? $this->get_args ( 'rtidKey' ) : "";
 		$ridKey = $this->get_args ( 'ridKey' ) ? $this->get_args ( 'ridKey' ) : "";

+ 33 - 1
protected/model/receipt.php

@@ -358,7 +358,7 @@ class receipt extends DooModel {
 		) );
 		
 		$rinfo ['ridKey'] = $XDeode->encode ( $rinfo ['rid'] );
-		$rinfo ['trainLoanRidKey'] = $XDeode->encode ( $rinfo ['trainLoanRid'] );
+		//$rinfo ['trainLoanRidKey'] = $XDeode->encode ( $rinfo ['trainLoanRid'] );
 		$XDeode = new XDeode ( 7 );
 		$rinfo ['ridKey7'] = $XDeode->encode ( $rinfo ['rid'] );
 		
@@ -370,6 +370,38 @@ class receipt extends DooModel {
 		return $rinfo;
 	}
 	
+	function getReceiptInRid($rid = ''){
+		
+		/* 
+		if (! is_numeric ( $rid )){
+			$rid = $XDeode->decode ( $rid );
+		} */
+		
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		Doo::loadModel ( 'L_category' );
+		$Lcategory = new L_category ();
+		Doo::loadModel ( 'staff' );
+		$staff = new staff ();
+		
+		$rinfo = $this->find ( array (
+				'where' => 'rid in (' . $rid.')',
+				'asArray' => true
+		) );
+		
+		foreach ($rinfo as $key=>$value){
+			$rinfo [$key] ['ridKey'] = $XDeode->encode ( $value ['rid'] );
+			//$rinfo [$key]['trainLoanRidKey'] = $XDeode->encode ( $value ['trainLoanRid'] );
+			$XDeode = new XDeode ( 7 );
+			$rinfo [$key]['ridKey7'] = $XDeode->encode ( $value ['rid'] );
+			
+			$rinfo[$key] ['category'] = $Lcategory->getCategoryById ( $value ['cid'] );
+			$rinfo[$key] ['staffDetail'] = $staff->getStaffBySid ( $value ['staff'] );
+		}
+		//print_r($rinfo);
+		return $rinfo;
+	}
+	
 	function getReceiptByTrainLoanRid($rid = '') {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );

+ 53 - 1
protected/plugin/TemplateTag.php

@@ -28,9 +28,38 @@ Doo::conf ()->TEMPLATE_GLOBAL_TAGS = array (
 		'isStaffCompleteMsg',
 		'isInvoiceCategoryShow',
 		'isReceiptTrainShow',
-		'isPaymentsShow'
+		'isPaymentsShow',
+		'isUrlEncode',
+		'isGHNews'
 );
 
+function isGHNews($staffGH){
+	
+	$BuildUrl = 'http://gh.cld.smartcost.com.cn';
+	//$url = $BuildUrl. '/mcm/authorize/receiptNewsTip?staffGH='. urlencode($staffGH);
+	//echo $url;
+	$url = $BuildUrl. '/mcm/authorize/receiptNewsTip';
+	$data=array("staffGH"=>$_COOKIE ['staffGH']);
+	
+	$result = json_decode(curl_request($url,$data), true);
+	return $result['count'];
+// 	print_r($result);
+// 	$isNews=false;
+// 	if($result['falg'])
+// 		$isNews=true;
+// 	return $isNews;
+}
+
+function isUrlEncode($url){
+	Doo::loadClass ( 'auth' );
+	$auth = new auth ( );
+	$staffGH=$auth->yundanran_auth($url,'DECODE',"GH");
+	
+	$staffGH=$auth->yundanran_auth($staffGH,'',"GH");
+	
+	return urlencode($staffGH);
+}
+
 function isStaffCompleteMsg(){
 	//检测用户信息完成
 	Doo::loadModel ( 'staff' );
@@ -500,4 +529,27 @@ function getExeCount() {
 	
 	$GLOBALS ['NEW2'] = count ( $receiptList );
 }
+
+/**
+ * curl 获取接口数据,data为空时为GET方法,有值则为POST方法
+ *
+ * @param $url
+ * @param string $data
+ * @return mixed|string
+ */
+function curl_request($url, $data = '') {
+	$curl = curl_init();
+	curl_setopt($curl, CURLOPT_URL, $url);
+	curl_setopt($curl, CURLOPT_HEADER, 0);
+	curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
+	if($data) {
+		curl_setopt($curl, CURLOPT_POST, 1);
+		curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
+	}
+	curl_setopt($curl, CURLOPT_TIMEOUT, 10);
+	$data = curl_exec($curl);
+	curl_close($curl);
+	return $data;
+}
+
 ?>

+ 1 - 1
protected/view/admin/companyMonthCollectDetail.html

@@ -30,7 +30,7 @@
                     <ul class="cateList">
                         <li><a class="now" href="/companyCategoryCollect">按办事处</a><a href="/staffCollect">按员工</a></li>
                         <li><select name="year" id="Y" onchange="receiptYear();">
-                            <!-- include 'year' -->
+                            {{dateHtml}}
                         </select>
                             <select name="month" id="M" onchange="receiptYear();">
                                 {{monthHtml}}

+ 9 - 1
protected/view/admin/receipt_menu.html

@@ -11,7 +11,9 @@
 						
 	<!-- if inarray({{staff.0.sid}},{{verifyId}}) || inarray({{staff.0.sid}},{{executeId}}) -->
 						
-	<li  class="topLine <!-- if  getGlobals('NEW') !=0 --> news <!-- endif --> "><a <!-- if {{receiptMemu}}=="approvalExpenses" --> class="selected" <!-- endif --> href="/approvalExpenses/pendApproval">费用审批</a></li>
+	<li  class="topLine <!-- if  getGlobals('NEW') !=0 --> news <!-- endif --> ">
+	<a <!-- if {{receiptMemu}}=="approvalExpenses" --> class="selected" <!-- endif --> href="/approvalExpenses/pendApproval">费用审批</a>
+	</li>
 						
 
 <li  class=""><a <!-- if {{receiptMemu}}=="receiptWasteBook" --> class="selected" <!-- endif --> href="/receiptWasteBook">费用流水</a></li>						
@@ -40,6 +42,12 @@
 	<li><a href="/wasteBook" <!-- if {{receiptMemu}}=="wasteBook" --> class="selected" <!-- endif --> >公司流水</a></li>
 	<!-- endif -->
 	
+	
+	
+	<li <!-- if  isGHNews($_COOKIE ['staffGH'])!=0 --> class="news" <!-- endif --> >
+	<a ghToken  href="javascript:void(0)" data-toggle="modal">工会</a>
+	</li>
+	
 	<li class="topLine"><a href="#welcome" data-toggle="modal">使用帮助</a></li>
 
 	</ul>

+ 1 - 1
protected/view/admin/saeaCategoryCollectDetail.html

@@ -36,7 +36,7 @@
 		<!-- endloop -->
 	</select></li>
 	<li><select name="year" id="Y" onchange="receiptYear();">
-		<!-- include 'year' -->
+		{{dateHtml}}
 	</select></li>
 	<li>报销总计:¥{{stList.rePrice}}</li>
 	<li>同意支付:<span class="colGreen">¥{{stList.agPrice}}</span></li>

+ 5 - 2
protected/view/admin/saeaCompanyCollect.html

@@ -22,8 +22,11 @@
 <div class="demandCate">
 <form action="/companyCategoryCollect" id="up" method="post">
 <ul class="cateList">
-	<li><a href="/companyCategoryCollect" class="now">按办事处</a><a
-		href="/staffCollect">按员工</a></li>
+	<li>
+	<a href="/companyCategoryCollect" class="now">按办事处</a>
+	<a href="/receiptSummaryStatisticsByAgency" >办事处明细</a>
+	<a href="/staffCollect">按员工</a>
+	</li>
 	<li><select name="year" id="Y" onchange="receiptYear();">
 		{{dateHtml}}
 	</select>

+ 2 - 1
protected/view/admin/year.html

@@ -3,4 +3,5 @@
 <option <!-- if {{year}}==2016 --> selected <!-- endif --> value="2016">2016</option>
 <option <!-- if {{year}}==2017 --> selected <!-- endif --> value="2017">2017</option>
 <option <!-- if {{year}}==2018 --> selected <!-- endif --> value="2018">2018</option>
-<option <!-- if {{year}}==2019 --> selected <!-- endif --> value="2019">2019</option>
+<option <!-- if {{year}}==2019 --> selected <!-- endif --> value="2019">2019</option>
+<option <!-- if {{year}}==2020 --> selected <!-- endif --> value="2020">2020</option>

+ 2 - 1
protected/view/expenses/wasteBookExpenditure.html

@@ -89,7 +89,8 @@
 							</div></li>
 							
 							
-	  					<li>合计:¥{{sum}}</li>
+	  					<li>{{year}}合计:¥{{sum}}</li>
+	  					<li>{{thsDay}}合计:¥{{thsDaySum}}</li>
 	  			</ul>
 	  			
 	  			</form>

+ 2 - 1
protected/view/expenses/wasteBookIncome.html

@@ -77,7 +77,8 @@
 									<button class="btn btn-small" type="submit">查询</button>
 								</div>
 							</div></li>
-	  					<li>合计:¥{{sum}}</li>
+	  					<li>{{year}}年合计:¥{{sum}}</li>
+	  					<li>{{thsDay}}合计:¥{{thsDaySum}}</li>
 	  			</ul>
 	  			
 	  			</form>

+ 2 - 1
protected/view/receipt/receiptTrainLoanEdi.html

@@ -26,10 +26,11 @@
 						<!-- include 'receiptTrainMenu' -->
 					</div>
 					<div class="saeaList">
-						<!-- if empty({{receiptLoanHtml}}) -->
 						<p>
 							<a href="#add-train" getReceiptLoan class="button" data-toggle="modal">添加借款</a>
 						</p>
+						<!-- if empty({{receiptLoanHtml}}) -->
+						
 						<!-- else -->
 						<legend>
 							<div class="fR"></div>