caipin 4 anos atrás
pai
commit
8d1e96f0cc

+ 15 - 1
global/gridManager/fee/incomeExpenses.js

@@ -303,7 +303,21 @@ const demo1 = {
                     // remind: '报销单,借款,对公汇款,培训班',
                     
                     text: '费用类别',
-                    disableMoveRow: true
+                    disableMoveRow: true,
+                    filter: {
+                        // 筛选条件列表, 数组对象。格式: [{value: '1', text: 'HTML/CSS'}],在使用filter时该参数为必设项。
+                        option: [
+                            {value: '活期理财收益', text: '活期理财收益'},
+                            {value: '固定理财收益', text: '固定理财收益'},
+                            {value: '银行存款', text: '银行存款'},
+                            {value: '功能开发中', text: '功能开发中'},
+                            
+                        ],
+                        // 筛选选中项,字符串, 未存在选中项时设置为''。 在此设置的选中的过滤条件将会覆盖query
+                        selected: '3',
+                        // 否为多选, 布尔值, 默认为false。非必设项
+                        isMultiple: false
+                    },
                 }, 
                 {
                     key: 'bookSerial',

+ 1 - 1
protected/class/comm_cld.php

@@ -33,7 +33,7 @@ function GetYear($year=""){
 		$year= date ( "Y" );
 	}
 	$now = date ( "Y" );
-	for($YEARD = 2050; $YEARD >= 2004; $YEARD --) {
+	for($YEARD = 2050; $YEARD >= 2014; $YEARD --) {
 			
 		if ($YEARD <= $now) {
 			$dateHtml .= '<option ';

+ 11 - 3
protected/controller/ReceiptAjaxController.php

@@ -322,16 +322,24 @@ class ReceiptAjaxController extends DooController {
 			}
 		}
 		
-		$con = ' and year(inputDate) = "'.$year.'" and month(inputDate)="'.$month.'"';
+		$days = cal_days_in_month(CAL_GREGORIAN, $month, $year);
+		$startYear=$year."-".$month."-01:00.00.00";
+		$endYear=$year."-".$month."-".$days.":23.59.59";
+		
+// 		$con = ' and year(inputDate) = "'.$year.'" and month(inputDate)="'.$month.'"';
+		$con =' and inputDate>= "'.$startYear.'" and inputDate<="'.$endYear.'" ';
 		
 		//收入
 		$incomeList = $wasteBook->getAccountBookByExpensesType ( 0, 1, $con );
 		//支出
 		$expenditureList = $wasteBook->getAccountBookByExpensesType ( 0, 2, $con );
 		
-		$firstday = date('Y-m-01', strtotime(date("Y-m-d")));
-		$lastday = date('d', strtotime("$firstday +1 month -1 day"));
+		//print_r($incomeList);
 		
+		$firstday = date('Y-m-01', strtotime(date("Y-m-d")));
+// 		$lastday = date('d', strtotime("$firstday +1 month -1 day"));
+		$lastday = $days;
+	
 		//print_r($incomeList);
 		//导入流水func
 		Doo::loadClass ( 'receipt.finances.func' );

+ 6 - 1
protected/controller/ReceiptController.php

@@ -13820,7 +13820,7 @@ class ReceiptController extends DooController {
 		$financesStatistics=$wasteBook->getFinancesStatistics();
 		//print_r($waste);
 		// 展示使用
-		//收入
+		// 收入
 		//print_r($inComeStatistics);
 		$wasteStatistics['CGBDeposit']=0;
 		$wasteStatistics['ICBCDeposit']=0;
@@ -13936,6 +13936,9 @@ class ReceiptController extends DooController {
 		
 		$data ['waste'] = $waste;
 		
+		
+		
+		
 		// 月流水数据结构
 		$monthStatistics = array ();
 		$incomeMothStatistics = array ();
@@ -13975,6 +13978,8 @@ class ReceiptController extends DooController {
 		$data ['incomeMothStatistics'] = json_encode ( $incomeMothStatistics );
 		$data ['expenditureMothStatistics'] = json_encode ( $expenditureMothStatistics );
 		
+		
+		
 		$expenditureList = $wasteBook->getAccountBookByExpensesType ( 4, 2 );
 		$incomeList = $wasteBook->getAccountBookByExpensesType ( 4, 1 );
 		// print_r($incomeList);

+ 9 - 2
protected/model/cld/accountBook_cld.php

@@ -49,11 +49,15 @@ class accountBook_cld extends DooModel {
 	);
 	
 	public function GetExpensesType($data=array()){
+		
+		
+		
 		$startYear=$data['year']."-01-01:00.00.00";
 		$endYear=$data['year']."-12-31:23.59.59";
 		if(!empty($data['month'])){
+			$days = cal_days_in_month(CAL_GREGORIAN, $data['month'], $data['year']);
 			$startYear=$data['year']."-".$data['month']."-01:00.00.00";
-			$endYear=$data['year']."-".$data['month']."-31:23.59.59";
+			$endYear=$data['year']."-".$data['month']."-".$days.":23.59.59";
 		}
 		
 		$sql=" ((expenditureDate>=? and expenditureDate<= ?) or (receivedDate>=? and receivedDate<= ?))  ";
@@ -78,11 +82,14 @@ class accountBook_cld extends DooModel {
 	//费用分页
 	public function GetPage($data=array()){
 	
+		
+		
 		$startYear=$data['year']."-01-01:00.00.00";
 		$endYear=$data['year']."-12-31:23.59.59";
 		if(!empty($data['month'])){
+			$days = cal_days_in_month(CAL_GREGORIAN, $data['month'], $data['year']);
 			$startYear=$data['year']."-".$data['month']."-01:00.00.00";
-			$endYear=$data['year']."-".$data['month']."-31:23.59.59";
+			$endYear=$data['year']."-".$data['month']."-".$days.":23.59.59";
 		}
 		//(inputDate>=? and inputDate<= ?) or   $startYear,$endYear,
 		$sql=" ((expenditureDate>=? and expenditureDate<= ?) or (receivedDate>=? and receivedDate<= ?))  ";

+ 1 - 1
protected/model/invoice.php

@@ -1418,7 +1418,7 @@ class invoice extends DooModel {
 		
 		return array (
 				'invoicePrice' => $invoicePrice,
-				'receivablesPrice' => $result ['receivablesPrice'],
+				'receivablesPrice' => sprintf("%.2f",$result ['receivablesPrice']),
 				'diffPrice' => $diffPrice 
 		);
 	}

+ 7 - 1
protected/model/wasteBook.php

@@ -106,9 +106,15 @@ class wasteBook extends DooModel {
 	}
 	
 	function getStatisticsByMonthAll($year= '',$month=''){
+		
+		$startYear=$year."-".$month."-01:00.00.00";
+// 		$endYear=$data['year']."-".$data['month']."-31:23.59.59";
+// 		date_format(inputDate,'%Y-%m')<date_format('".$year."-".$month."-1','%Y-%m')
+		
 		$list  = $this->find ( array (
 				'select' => 'sum(accountPrice) as accountPrice,sum(accountPriceShow) as accountPriceShow,date_format(inputDate,"%Y-%m") ,Month(inputDate) as month,expensesType,Year(inputDate),Day(inputDate) as day',
-				'where' => " date_format(inputDate,'%Y-%m')<date_format('".$year."-".$month."-1','%Y-%m') and (expensesType=1 or expensesType=2)",
+				'where' => " inputDate< ?  and (expensesType=1 or expensesType=2)",
+				'param' =>array($startYear),
 				//'groupby' => 'Day(inputDate)',
 				'asArray' => TRUE
 		) );

+ 3 - 3
protected/services/incomeExpenses_service.php

@@ -343,7 +343,7 @@ class incomeExpenses_service {
 				}
 				
 				if (! empty ( $value ['accountMsg'] )) {
-					$data ['list'] [$key] ['typeShow'] .= $value ['accountMsg'];
+					$data ['list'] [$key] ['typeShow'] .= ' / '.$value ['accountMsg'];
 				}
 				
 				$data ['list'] [$key] ['priceShow'] = $value ['receivedPrice'];
@@ -357,7 +357,7 @@ class incomeExpenses_service {
 				$data ['list'] [$key] ['dateShow'] = $value ['expenditureDate'];
 				$data ['list'] [$key] ['bankShow'] = $value ['expenditureBank'];
 				if ($value ['operatingBankType'] == 1) {
-					$data ['list'] [$key] ['bankShow'] .= $value ['depositMethod'];
+					$data ['list'] [$key] ['bankShow'] .= ' / '.$value ['depositMethod'];
 				}
 				
 				if ($value ['expensesType'] == 1) {
@@ -396,7 +396,7 @@ class incomeExpenses_service {
 				}
 				
 				if (! empty ( $value ['expenditureMsg'] )) {
-					$data ['list'] [$key] ['typeShow'] .= $value ['expenditureMsg'];
+					$data ['list'] [$key] ['typeShow'] .=' / '. $value ['expenditureMsg'];
 				}
 				
 				$data ['list'] [$key] ['priceShow'] = $value ['expenditurePrice'];

+ 11 - 6
protected/view/expenses/wasteBook.html

@@ -22,10 +22,13 @@
 					<div class="borad-menu"></div>
 					<div class="borad-news">
 						<div class="saeaList">
+						
+						
+						
 							<div class="clearfix">
 							
 							
-								<table class="table table-bordered table-condensed">
+								<table class="table table-bordered table-condensed" style="display:none">
 								<thead>
 								<tr><th colspan="8">存款-录入系统前金额</th></tr>
 								</thead>
@@ -45,7 +48,7 @@
 								</table>
 							
 							
-								<table class="table table-bordered table-condensed">
+								<table class="table table-bordered table-condensed" style="display:none">
 								<thead>
 								<tr><th colspan="8">存款-收入的流水金额(日常收入,发票,借款,借款报销,报销单,对公汇款,培训班结算)</th></tr>
 								</thead>
@@ -64,7 +67,7 @@
 								</tbody>
 								</table>
 							
-							<table class="table table-bordered table-condensed">
+							<table class="table table-bordered table-condensed" style="display:none">
 								<thead>
 								<tr><th colspan="8">存款-支出的流水金额(日常支出,收款退款,借款,借款报销,报销单,对公汇款,培训班结算)</th></tr>
 								</thead>
@@ -83,7 +86,7 @@
 								</tbody>
 								</table>
 							
-							<table class="table table-bordered table-condensed">
+							<table class="table table-bordered table-condensed" style="display:none">
 								<thead>
 								<tr><th colspan="6">存款-日常收支改版的流水金额(日常支出,日常收入)</th></tr>
 								</thead>
@@ -101,7 +104,7 @@
 								</tbody>
 								</table>
 							
-							<table class="table table-bordered table-condensed">
+							<table class="table table-bordered table-condensed" style="display:none">
 								<thead>
 								<tr><th colspan="6">理财-公司账号的流水金额</th></tr>
 								</thead>
@@ -120,7 +123,7 @@
 								</table>
 							
 							
-								<table class="table table-bordered table-condensed">
+								<table class="table table-bordered table-condensed" style="display:none">
 									<tbody>
 									
 									<tr>
@@ -162,6 +165,8 @@
 									</tbody>
 								</table>
 							</div>
+							
+							
 							<div class="clearfix">
 								<div id="chartContainer3" style="height: 300px; width: 100%;">
 								</div>

+ 0 - 23
protected/view/fee/incomeExpenses/income.html

@@ -1,27 +1,4 @@
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 <!-- include '../../comm/header' -->
 <link href="<?= WEB_SITE_GLOBAL ?>gridManager/common.css" rel="stylesheet" type="text/css">
 <link href="<?= WEB_SITE_GLOBAL ?>gridManager/gm.css" rel="stylesheet" type="text/css">